使用pomelo建立的項目而且安裝依賴項目以後啓動項目如出現以下錯誤提示node
[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.
問題緣由和解決方式git
緣由:新版的socket.io用法不正確的致使的,官方早已修復,就是沒有publish到npm包中github
修復方式:把node_modules目錄下的pomelo中sioconnector.js(../game-server/node_modules/pomelo/lib/connectors/sioconnector.js) npm
替換爲 https://github.com/NetEase/pomelo/blob/master/lib/connectors/sioconnector.jssocket
替換後再啓動game-server,就沒有這些錯誤提示了socket.io