Make node show stack trace after EventEmitter warning

后端 未结 1 1759
盖世英雄少女心
盖世英雄少女心 2020-12-16 15:01

I have this error:

(node:11164) Warning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
         


        
相关标签:
1条回答
  • 2020-12-16 15:27

    This changed with Node v6 (or possibly with v5).

    Previously, a stack trace was shown automatically, now you have to generate one yourself:

    process.on('warning', e => console.warn(e.stack));
    

    Documented here.

    0 讨论(0)
提交回复
热议问题