Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript node.js出现Heroku部署错误_Javascript_Node.js_Heroku_Socket.io - Fatal编程技术网

Javascript node.js出现Heroku部署错误

Javascript node.js出现Heroku部署错误,javascript,node.js,heroku,socket.io,Javascript,Node.js,Heroku,Socket.io,应用程序在node.js中编程,并使用socket.io进行实时请求 应用程序运行良好,但今天我遇到了一个无限大的错误: 2015-10-08T08:31:37.477080+00:00 app[web.1]: Prevented node from exit... 2015-10-08T08:31:37.477495+00:00 app[web.1]: TypeError: Cannot read property 'length' of undefined 2015-10-08T08:31:

应用程序在node.js中编程,并使用socket.io进行实时请求

应用程序运行良好,但今天我遇到了一个无限大的错误:

2015-10-08T08:31:37.477080+00:00 app[web.1]: Prevented node from exit...
2015-10-08T08:31:37.477495+00:00 app[web.1]: TypeError: Cannot read property 'length' of undefined
2015-10-08T08:31:37.477496+00:00 app[web.1]:     at onwriteDrain (_stream_writable.js:354:12)
2015-10-08T08:31:37.477497+00:00 app[web.1]:     at afterWrite (_stream_writable.js:344:5)
2015-10-08T08:31:37.477498+00:00 app[web.1]:     at wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:157:28)
2015-10-08T08:31:37.477498+00:00 app[web.1]:     at doNTCallback0 (node.js:408:9)
2015-10-08T08:31:37.477499+00:00 app[web.1]:     at Immediate._tickCallback [as _onImmediate] (node.js:337:13)
2015-10-08T08:31:37.477500+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:374:17)
2015-10-08T08:31:37.477873+00:00 app[web.1]: TypeError: Cannot read property 'length' of undefined
2015-10-08T08:31:37.477503+00:00 app[web.1]: Prevented node from exit...
2015-10-08T08:31:37.477875+00:00 app[web.1]:     at onwriteDrain (_stream_writable.js:354:12)
2015-10-08T08:31:37.477875+00:00 app[web.1]:     at afterWrite (_stream_writable.js:344:5)
2015-10-08T08:31:37.477876+00:00 app[web.1]:     at wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:157:28)
2015-10-08T08:31:37.477877+00:00 app[web.1]:     at Immediate._tickCallback [as _onImmediate] (node.js:337:13)
2015-10-08T08:31:37.477877+00:00 app[web.1]:     at doNTCallback0 (node.js:408:9)
2015-10-08T08:31:37.477878+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:374:17)
2015-10-08T08:31:37.477900+00:00 app[web.1]: Prevented node from exit...
有人能帮忙吗

非常感谢。

问题在于npm的“请求”包,它与node.js的最新版本不兼容

所以我在package.js中显式地添加了这个版本

"engines": {
  "node": "0.10.x"
},
现在一切正常。
谢谢

您试过查看“长度”属性吗?您的代码中是否有stream_writable.js文件?