Node.js-Chat icon indicating copy to clipboard operation
Node.js-Chat copied to clipboard

has no method 'set'

Open bellwood opened this issue 11 years ago • 2 comments

When you enter a name and submit the form you see:

[root@dev nodejs]# node server.js Server listening on port 80 Warning: missing space before text for line 52 of jade file "/home/nodejs/views/home.jade" Warning: missing space before text for line 54 of jade file "/home/nodejs/views/home.jade" Warning: missing space before text for line 59 of jade file "/home/nodejs/views/home.jade" Warning: missing space before text for line 66 of jade file "/home/nodejs/views/home.jade" Warning: missing space before text for line 67 of jade file "/home/nodejs/views/home.jade"

/home/nodejs/server.js:56 socket.set('pseudo', data, function(){ ^ TypeError: Object #<Socket> has no method 'set' at Socket. (/home/nodejs/server.js:56:11) at Socket.emit (events.js:95:17) at Socket.onevent (/home/nodejs/node_modules/socket.io/lib/socket.js:326:8) at Socket.onpacket (/home/nodejs/node_modules/socket.io/lib/socket.js:286:12) at Client.ondecoded (/home/nodejs/node_modules/socket.io/lib/client.js:181:14) at Decoder.Emitter.emit (/home/nodejs/node_modules/socket.io/node_modules/socket.io-parser/node_modules/emitter/index.js:132:20) at Decoder.add (/home/nodejs/node_modules/socket.io/node_modules/socket.io-parser/index.js:233:12) at Client.ondata (/home/nodejs/node_modules/socket.io/lib/client.js:166:16) at Socket.emit (events.js:95:17) at Socket.onPacket (/home/nodejs/node_modules/socket.io/node_modules/engine.io/lib/socket.js:96:14)

bellwood avatar Jun 26 '14 01:06 bellwood

...likely due to older methods needing to be replaced with

socket.on('get socket.on('set

bellwood avatar Jun 26 '14 02:06 bellwood

Looks to me like this app has very specific (older) needs for socket.io as well as express, but is set in package.json to use latest versions...

krisdahl avatar Jan 03 '15 00:01 krisdahl