将socket.io版本从0.9.10更新到2.1.1后发生错误

时间:2018-07-19 13:15:47

标签: node.js socket.io

以下代码段

io.of('/events').clients(roomName)

给我以下错误消息:

if (fn) process.nextTick(fn.bind(null, null, sids));
                          ^

TypeError: fn.bind is not a function
at Adapter.clients (/windows/market_dojo_emarketplace/marketdojo-pubsub-server/node_modules/socket.io-adapter/index.js:210:31)
at Namespace.clients (/windows/market_dojo_emarketplace/marketdojo-pubsub-server/node_modules/socket.io/lib/namespace.js:265:16)
at handleEventMessage (/windows/market_dojo_emarketplace/marketdojo-pubsub-server/app.coffee:131:26)
at Socket.<anonymous> (/windows/market_dojo_emarketplace/marketdojo-pubsub-server/app.coffee:81:16)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage (dgram.js:659:8)

有什么建议值得我解决吗?

0 个答案:

没有答案