pomelo
pomelo copied to clipboard
start server error
npm 卸载pomelo ,再重新安装
run command : pomelo --verion // 2.2.5
use command: pomelo init to create project directory layouts
run command on windows 7 : npm-install.bat
goto game-server directory , run : pomelo start
(pomelo init 选择通信方式的时候,选择的是2: socket.io)
errors:
[2017-02-13 17:29:32.674] [ERROR] console - Option path is not valid. Please refer to the README.
[2017-02-13 17:29:32.675] [ERROR] console - Option close timeout is not valid. Please refer to the README.
[2017-02-13 17:29:32.675] [ERROR] console - Option heartbeats is not valid. Please refer to the README.
[2017-02-13 17:29:32.675] [ERROR] console - Option log level is not valid. Please refer to the README
这是从项目的game-server\node_modules\socket.io\lib\index.js 中找到的源码: `/**
- Old settings for backwards compatibility */
var oldSettings = { "transports": "transports", "heartbeat timeout": "pingTimeout", "heartbeat interval": "pingInterval", "destroy buffer size": "maxHttpBufferSize" };
/**
- Backwards compatibility.
- @api public */
Server.prototype.set = function(key, val){ if ('authorization' == key && val) { this.use(function(socket, next) { val(socket.request, function(err, authorized) { if (err) return next(new Error(err)); if (!authorized) return next(new Error('Not authorized')); next(); }); }); } else if ('origins' == key && val) { this.origins(val); } else if ('resource' == key) { this.path(val); } else if (oldSettings[key] && this.eio[oldSettings[key]]) { this.eio[oldSettings[key]] = val; } else { console.error('Option %s is not valid. Please refer to the README.', key); }
return this; };`
请问是什么情况
have same issue...
同样的问题,pomelo哪个node版本支持的最好?
node 7 版本出现一样的问题,然后请求出错。所以先回退吧
I have the same issue
I have the same issue
这个是sioconnect.js 使用socketio时传入了 不支持的参数 估计是因为升级但是有些接口没去修改引起的
应该 不影响执行 但是希望能尽快修复下
[2017-04-20 08:53:33.375] [INFO] pomelo - 377: [/root/WebstormProjects/treasures/game-server/node_modules/pomelo/lib/application.js] "gate-server-1" enter after start...
[2017-04-20 08:53:33.722] [ERROR] console - Option path is not valid. Please refer to the README.
[2017-04-20 08:53:33.723] [ERROR] console - Option close timeout is not valid. Please refer to the README.
[2017-04-20 08:53:33.723] [ERROR] console - Option heartbeats is not valid. Please refer to the README.
[2017-04-20 08:53:33.723] [ERROR] console - Option log level is not valid. Please refer to the README.
[2017-04-20 08:53:33.723] [INFO] console - sio Server listening at port 3015
@zmox 你说的太好了 请官方的人看一下这个错误 @fantasyni @py8765
源码
app.configure('production|development', 'gate', function () {
app.set('connectorConfig', {
connector: pomelo.connectors.sioconnector
});
});
目测官方不维护?都写游戏挣 钱去了?
Actually i'm upgrading to pomelo 2.2.5 to avoid: https://github.com/NetEase/pomelo/issues/903
And i find myself in this issue... Did someone avoid this?
http://nodejs.netease.com/topic/5880dee5489e266d5b187381#59094805489e266d5b459fb3
It's due to the changes in this commit: https://github.com/NetEase/pomelo/commit/cbbf1585acf85e53a07d858a2ec170f0ff413a91
Socket.IO 1.7.x doesn't have these properties "path", "close timeout", "heartbeats", "log level"