使用pomelo创建的项目并且安装依赖项目之后启动项目如出现如下错误提示

Option path is not valid. Please refer to the README.

[2018-12-18 11:23:16.161] [ERROR] console - Option path is not valid. Please refer to the README.
[2018-12-18 11:23:16.161] [ERROR] console - Option close timeout is not valid. Please refer to the README.
[2018-12-18 11:23:16.161] [ERROR] console - Option heartbeats is not valid. Please refer to the README.
[2018-12-18 11:23:16.161] [ERROR] console - Option log level is not valid. Please refer to the README.

问题原因和解决方式

  原因:新版的socket.io用法不正确的导致的,官方早已修复,就是没有publish到npm包中

  修复方式:把node_modules目录下的pomelo中sioconnector.js(../game-server/node_modules/pomelo/lib/connectors/sioconnector.js

                   替换为 https://github.com/NetEase/pomelo/blob/master/lib/connectors/sioconnector.js

 替换后再启动game-server,就没有这些错误提示了

相关文章:

  • 2022-01-10
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-05-16
  • 2021-05-27
  • 2021-10-27
猜你喜欢
  • 2022-12-23
  • 2021-12-16
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-03-10
相关资源
相似解决方案