I've upgraded to the latest stable version of node (20.9.0) and now whenever I make a react app using npx create-react-app or using vite, it always shows the "possible eventEmitter memory leak detected" warning. I've also read other people questions and their reltd answers but none of them is concerning with my issue.
I got warning "(node:14868) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit" whenever making a new react app using npx create-react-app or using vite. here is the attached picture for reference.enter image description here
Open Node.js REPL (Read-Evaluate-Print Loop) environment. In this environment, you can execute JavaScript code interactively. To access the emitter object and its methods, you need to define and instantiate it first. Here's an example code snippet to help you get started:
By defining the emitter object and instantiating it from the EventEmitter class, you can then access its methods, such as
getMaxListeners(). Let me know if you need further assistance! And you can increase the event listener using the method, "emitter.setMaxListeners(value)". Where the value is the max number you want to set it to.Example:emitter.setMaxListeners(30)