node.websocket.js icon indicating copy to clipboard operation
node.websocket.js copied to clipboard

Incompatible with Node.js v.0.1.31

Open tsgautier opened this issue 15 years ago • 2 comments

Running Node.js v0.1.31 gives the following:

TypeError: Cannot read property 'Connection' of undefined
at [object Object].connect (/Users/tgautier/src/node.websocket.js/lib/redis.js:47:32)
at Object.<anonymous> (/Users/tgautier/src/node.websocket.js/log.js:66:8)
at Module._compile (node.js:719:23)
at Module._loadScriptSync (node.js:734:16)
at Module.loadSync (node.js:630:10)
at loadModule (node.js:575:16)
at require (node.js:698:12)
at Object.<anonymous> (/Users/tgautier/src/node.websocket.js/websocket.js:14:14)
at Module._compile (node.js:719:23)
at Module._loadScriptSync (node.js:734:16)

Switching to v0.1.29 removes this issue.

tsgautier avatar Mar 17 '10 02:03 tsgautier

That's a redis-node-client bug. To be compatible with current trunk version there should be: this.conn = new net.Stream(); instead of: this.conn = new process.tcp.Connection();

telendt avatar Mar 27 '10 21:03 telendt

didn´t work: The 'tcp' module is now called 'net'. Otherwise it should have a similar interface.

node.js:63 throw e; ^ ReferenceError: net is not defined at [object Object].connect (/home/tomtom/nodejs-test/websockets/guille-node.websocket.js-cca2fd8/lib/redis.js:47:5) at Object. (/home/tomtom/nodejs-test/websockets/guille-node.websocket.js-cca2fd8/log.js:66:8) at Module._compile (node.js:462:23) at Module._loadScriptSync (node.js:469:10) at Module.loadSync (node.js:338:12) at loadModule (node.js:283:14) at require (node.js:411:14) at Object. (/home/tomtom/nodejs-test/websockets/guille-node.websocket.js-cca2fd8/websocket.js:14:14) at Module._compile (node.js:462:23) at Module._loadScriptSync (node.js:469:10)

TomTomaso avatar Oct 15 '10 09:10 TomTomaso