Getting MaxListenersExceededWarning: Possible EventEmitter memory leak detected. after updating to latest version of oclif
svishalkumar06 opened this issue · comments
I am getting the following error when running the custom command
(node:748) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ...
to show where the warning was created)
I have following packages as dependencies
"@salesforce/sf-plugins-core": "4.0.0",
"@oclif/core": "^3.0.0",
I have the following packages as dev dependencies
"@oclif/plugin-help": "^5.2.8",
"@oclif/test": "^2.5.6",
"oclif": "^4.0.3",
"ts-node": "^10.9.1",
In Oclif core v2 the issue is not coming
Not able to find the root cause of it
I need a little more information. Can you run the command with the NODE_OPTIONS="--trace-warnings"
env var set and share any of the output?
If you're using sf
, you can also set the SF_MAX_EVENT_LISTENERS
env var to increase the max number of event listeners (it defaults to 10)
Closing this since it's gone stale. Please reopen if you still have an issue.