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

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

[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,就没有这些错误提示了

posted @ 2018-12-18 11:42  Ring_1992  阅读(707)  评论(0编辑  收藏  举报