0

Unable to know how this error comes

Error:-

(node:13584) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): ReferenceError: response is not defined (node:13584) Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit

I have found similar issue like that

  1. https://github.com/nodejs/node/issues/9242

  2. https://github.com/facebookincubator/create-react-app/issues/1776

  3. NodeJS UnhandledPromiseRejectionWarning

But none to seem to answer my question

node version I am using v6.10.2 (find via node --version)

npm version I am using 3.10.10 (find via npm --version)

Now feeling fear of closing the server . How can I avoid this ? Is there any method of stopping that

VIKAS KOHLI
  • 8,164
  • 4
  • 50
  • 61
  • Where is your code ? Show us some code to look before asking for solutions. – Prabodh M Jun 23 '17 at 04:36
  • How can I know what some code you want ? – VIKAS KOHLI Jun 23 '17 at 04:55
  • The code which is giving you these errors. – Prabodh M Jun 23 '17 at 05:04
  • Mate, I already wrote I don't know how it come. Also I have multiple files in my project so unable to find error – VIKAS KOHLI Jun 23 '17 at 05:41
  • Without code its hard to say, but a probable reason would be you have started listening to events, but you forgot to close while opening it. Even I got that when I forgot to close my Db connection. There were dangling connection, so node was crying that it exceeded the limit of listeners, which is by default 10. – Prabodh M Jun 23 '17 at 06:06
  • https://stackoverflow.com/questions/44328580/how-do-i-find-out-where-an-unhandled-promise-rejection-occured/44328885#44328885 – ponury-kostek Jun 23 '17 at 07:48

0 Answers0