nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.69k stars 7.63k forks source link

@nestjs/common@^10.0.0(node:47898) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit #12696

Closed aasisdhakal closed 1 year ago

aasisdhakal commented 1 year ago

Is there an existing issue for this?

Current behavior

While setting up a new project and running the npm install command, I encountered the following error message:

@nestjs/common@^10.0.0(node:47898) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

Minimum reproduction code

https://github.com/nestjs/typescript-starter

Steps to reproduce

  1. Clone git@github.com:nestjs/typescript-starter.git
  2. Switch to node version v20.9.0
  3. npm install

Expected behavior

It works perfectly on node 18

Package

Other package

No response

NestJS version

10.0.0

Packages versions

[System Information] OS Version : Linux 6.2 NodeJS Version : v20.9.0 NPM Version : 10.2.1

[Nest CLI] Nest CLI Version : 10.2.1

[Nest Platform Information] platform-express version : 10.2.8 schematics version : 10.0.3 testing version : 10.2.8 common version : 10.2.8 core version : 10.2.8 cli version : 10.2.1

Node.js version

20.9.0

In which operating systems have you tested?

Other

No response

micalevisk commented 1 year ago

I didn't managet to reproduce this here on my Ubuntu using nodejs v20.9.0.

So I don't think that this is something we can fix on our side.

Try it out using npm i --ignore-scripts

Tony133 commented 1 year ago

I also tried it on macOS but could not replicate it ( see screenshot ), maybe try reinstalling node

screen-node-v20 9 0
micalevisk commented 1 year ago

thanks Tony

sgarner commented 11 months ago

FYI, this was a bug in Node.js: https://github.com/nodejs/node/pull/50136

Fixed in node v20.10.0