照着nodejs实战 书中的用nodejs + angularjs + socket + mongodb 弄得一个聊天程序,不知道怎么回事出现这个问题,是session的原因?
d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node API\mean_talk\node_modul
es\connect\lib\utils.js:232
**return 0 == str.indexOf(‘s:’) **
^
**TypeError: Cannot call method ‘indexOf’ of undefined\n **
at exports.parseSignedCookie (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\n
odeT\node API\mean_talk\node_modules\connect\lib\utils.js:232:19)
at messages (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node API\mea
n_talk\app.js:86:16)
at Array.0 (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node API\mean
_talk\node_modules\socket.io\lib\index.js:117:7)
at run (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node API\mean_tal
k\node_modules\socket.io\lib\namespace.js:114:11)
at Namespace.run (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node AP
I\mean_talk\node_modules\socket.io\lib\namespace.js:126:3)
at Namespace.add (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node AP
I\mean_talk\node_modules\socket.io\lib\namespace.js:155:8)
at Client.connect (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node A\n
PI\mean_talk\node_modules\socket.io\lib\client.js:67:20)
at Server.onconnection (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\n
ode API\mean_talk\node_modules\socket.io\lib\index.js:307:10)
at Server.EventEmitter.emit (events.js:95:17)
at Server.handshake (d:\Coding\My sites T\绉掑井璇惧爞瀛︿範\demo\nodeT\node
API\mean_talk\node_modules\socket.io\node_modules\engine.io\lib\server.js:250:8
)