Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. #211

Open
simlevesque opened this issue Jun 7, 2021 · 1 comment

Comments

@simlevesque
Copy link

simlevesque commented Jun 7, 2021

Hello, I'm running a command with ultra in 6 sub directories. I'm trying to run the following:

pwd; node -p -e "require(\'./package.json\').version"

in each subdirectory, at in serial mode (--concurrency 1).

I get this error:

(node:52735) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:52735) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:52735) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit

The script still run but it's an ugly output. I don't really understand why.

If I remove the call to pwd, there is no error, so this works:
ultra --raw --concurrency 1 -r 'node -p -e "require(\'./package.json\').version"'
but this does not:
ultra --raw --concurrency 1 -r 'pwd; node -p -e "require(\'./package.json\').version"'

Is there some way to fix this cleanly ? Thank you !

Edit: Currently I'm using: node --no-warnings ./node_modules/.bin/ultra to get around the problem.

@jeffrson
Copy link

jeffrson commented Dec 2, 2022

This is also an issue with our mono-repo. Any chance this will get fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants