1

The application is programmed in node.js and using socket.io for real-time requests.

the application was working fine, but today I'm getting this infinitely error:

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...

can anyone help please!

i'll appreciate it, Thanks.

1
  • 1
    have you tried looking at the "length" property? Do you have a stream_writable.js file within your code? Commented Oct 8, 2015 at 10:15

1 Answer 1

2

the problem was the "request" package from npm, it's not compatible with the last version of node.js.

So I add the version explicitly in package.js

"engines": {
  "node": "0.10.x"
},

now everything works fine. Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.