search

Home  >  Q&A  >  body text

node.js - 一个聊天室应用部署时socket.io的XMLHttpRequest出现object is not a function错误

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

nodejs版本情况如下:

PHPzPHPz2767 days ago603

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 11:32:55

    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

    reply
    0
  • Cancelreply