I know this might flag as a duplicate solution but solution on stack overflow is not working for me.
(node:5716) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message lis teners added. Use emitter.setMaxListeners() to increase limit.
My code base is huge and i facing this error sometimes i don’t know why it is happening
What I tried :
Tried to increase the listeners limit but unfortunately it is not working.
const EventEmitter = require('events'); const emitter = new EventEmitter() emitter.setMaxListeners(50)