我收到以下警告:
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace:
at EventEmitter.<anonymous> (events.js:139:15)
at EventEmitter.<anonymous> (node.js:385:29)
at Server.<anonymous> (server.js:20:17)
at Server.emit (events.js:70:17)
at HTTPParser.onIncoming (http.js:1514:12)
at HTTPParser.onHeadersComplete (http.js:102:31)
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
我在server.js中编写了这样的代码:
http.createServer(
function (req, res) { ... }).listen(3013);
如何解决呢?
我们团队对此的解决方法是从.npmrc中删除注册表路径。我们在rc文件中有两个路径别名,一个是指向已被弃用的Artifactory实例。
错误无关,与我们的应用程序的实际代码,但一切都与我们的开发环境。