I am getting the following warning message when I try to install or create Node.js projects on macOS (darwin):
(node:80101) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
I have updated Node.js to the latest version (V20.5.1) after I was seeing the warning for too many times, and npm was already up to date (V9.8.1). I'm not using any third-party tools, and I simply use terminal.
The commands I get the warning after are:
npm install ...
and
npx ...
.
I get the warning message at least once after executing these commands (usually multiple times).
The projects I was working on didn't even have NodeJS files, both times I was busy on a react and next project (which I think is irrelevant, because I see the same warning when using NPM in terminal outside any projects).
I'd appreciate if anyone can help me with this. So far I haven't noticed anything wrong in projects or installing process except the warning itself, but I don't understand why should the warning pop-up when I haven't made any changes to any configurations in NPM or node.
Tried installing packages with NPM and creating projects with NPX, which both resulted the same warning (sometimes multiple times before the completion of install or create process):
(node:80101) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit