socket.io errors out in Node v0.11.14 (unstable version) when used in worker

52 views
Skip to first unread message

Paul

unread,
Oct 30, 2014, 5:51:03 AM10/30/14
to nod...@googlegroups.com
Hi, 

Sort of cross-posting this, as this might be a more appropriate place in hindsight, as this might be an issue in the unstable version of node itself: https://github.com/Automattic/socket.io/issues/1841

When using socket.io with Node v0.11.14, it errors out immediately when just doing require('socket.io") in a worker with the following error. Note that I tested this various ways and the it's reproducible everytime. Try the samplecode of the sticky-sessions module for example (https://github.com/indutny/sticky-session).

Error:
C:\Users\me\Desktop\NodeJS Testing\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\transports\polling.js:23
var xhr = new XMLHttpRequest({ agent: this.agent, xdomain: false });
^
TypeError: Cannot read property 'agent' of undefined
at C:\Users\me\Desktop\NodeJS Testing\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\transports\polling.js:23:45
at Object. (C:\Users\me\Desktop\NodeJS Testing\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\transports\polling.js:25:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\me\Desktop\NodeJS Testing\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\transports\polling-xhr.js:6:15)
at Module._compile (module.js:460:26)
Reply all
Reply to author
Forward
0 new messages