node.js - 一个聊天室应用部署时socket.io的XMLHttpRequest出现object is not a function错误
PHPz
PHPz 2017-04-17 11:30:55
0
1
620

网上下载的一个nodejs+express+jade的聊天室应用,
部署后运行,提示object is not a function错误,如下图所示:

nodejs版本情况如下:

PHPz
PHPz

学习是最好的投资!

reply all(1)
Peter_Zhu

That is because of a version problem. The most likely reason is that the socket.io used by the source code you downloaded is below version 0.9. Socket.io versions above 1.0 have undergone great changes and are incompatible.

It is recommended that you enter npm install socket.io@0.9

when installing
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template