NPM模块curlrequest生成检测到可能的EventEmitter内存泄漏

时间:2017-07-06 18:01:56

标签: node.js post npm

我一直在寻找解决以下问题:

我正在使用npm模块'curlrequest'

进行curlrequest

我正在通过一组id号进行循环,然后每个id用于使用此模块'curlrequest'向远程服务器发出传出的POST请求

我收到以下错误:

        curl.stdout.on('data', function (data) {
               ^
TypeError: Cannot read property 'on' of undefined

发出以下警告:

(node:21363) Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
(node:21363) Warning: Possible EventEmitter memory leak detected. 11 unpipe listeners added. Use emitter.setMaxListeners() to increase limit
(node:21363) Warning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:21363) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:21363) Warning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我的具体解决方案并未真正解决这个问题,但我决定停止使用此模块并切换到标准请求库。