version 3.4 Cannot find module 'file'"
liutekiMacBook-Pro:game-server liu$ ./node_modules/pomelo/bin/pomelo start
/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:205
throw new Error("Problem reading log4js config " + util.inspect(co
^
Error: Problem reading log4js config { appenders:
[ { type: 'file',
filename: './logs/node-log-master-server-1.log',
fileSize: 1048576,
layout: [Object],
backups: 5 },
{ type: 'console' },
{ type: 'file',
filename: './logs/rpc-log-master-server-1.log',
fileSize: 1048576,
layout: [Object],
backups: 5,
category: 'rpc-log' },
{ type: 'file',
filename: './logs/forward-log-master-server-1.log',
fileSize: 1048576,
layout: [Object],
backups: 5,
category: 'forward-log' },
{ type: 'file',
filename: './logs/crash.log',
fileSize: 1048576,
layout: [Object],
backups: 5,
category: 'crash-log' } ],
levels: { 'rpc-log': 'ERROR', 'forward-log': 'ERROR' },
replaceConsole: true }. Error was "Cannot find module 'file'" (Error: Cannot find module 'file'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at loadAppender (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:290:26)
at /Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:145:13
at Array.forEach (native)
at configureAppenders (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:144:22)
at configureOnceOff (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:196:13)
at Object.configure (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:256:5))
at configureOnceOff (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:205:19)
at Object.configure (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:256:5)
at Object.configure (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/node_modules/pomelo-logger/lib/logger.js:46:9)
at Object.module.exports.configure (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/lib/util/log.js:9:10)
at configLogger (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/lib/util/appUtil.js:153:9)
at Object.module.exports.defaultConfiguration (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/lib/util/appUtil.js:14:3)
at Object.Application.init (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/lib/application.js:55:11)
at Object.Pomelo.createApp (/Users/liu/work/cocosfamily/cc221/chat/game-server/node_modules/pomelo/lib/pomelo.js:67:7)
at Object.
Maybe you should try to install pomelo -g and use global pomelo command to start the application.
同centos 6上的错误一样,是用pomelo -g 安装的
试试我的方法,把log4js退到0.5.7版本
log4js现在更新到了0.6.0 可能是这个原因,改成旧版本就能运行了。 找到将pomelo-logger里面的package.json中的"log4js": ">=0.5.3"改成"log4js": "=0.5.7",删除pomelo-logger里面的node_modules,在pomelo-logger目录下重新npm install -d
我按上面的方法改了版本确实可以,但是现在又有个问题,gameserver链接不上
im having the same issue. Any idea how to fix this? I dont understand mandarin.
bump:still not able to start the server because of this issue on osx 10.6.8
ok fixed it.. If anyone has the above issue then do the following:
go to the following directory
yourapp/game-server/node_modules/pomelo/node_modules/pomelo-logger
open package.json and change the version of log4js to 0.5.7 so it should look like "log4js": "=0.5.7"
then save the file and finally run the command
npm install -d
Thats it now your server should start
thinks
不行啊,还是有新问题。。。
E:\Test\helloworld\game-server>pomelo start [32m[2013-03-23 21:19:25.722] [INFO] \node_modules\pomelo\lib\application.js - [39mapplication inited: "master-server-1" [2013-03-23 21:19:25.722] [INFO] \node_modules\pomelo\lib\application.js - application inited: "master-server-1"
'C:\Program' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 [32m[2013-03-23 21:19:25.918] [INFO] console - [39minfo: 'socket.io started' [32m[2013-03-23 21:19:25.919] [INFO] \node_modules\pomelo\lib\master\starter.js - [39mExecuting cd E:\Test\helloworld\game-server && C:\Program Files\nodejs\node.exe E:\Test\helloworld\game-server\app.js env=development id=connector-server-1 host=127.0.0.1 port=3150 clientPort=3010 frontend=true serverType=connector locally [2013-03-23 21:19:25.918] [INFO] console - info: 'socket.io started'
[2013-03-23 21:19:25.919] [INFO] \node_modules\pomelo\lib\master\starter.js - Executing cd E:\Test\helloworld\game-server && C:\Program Files\nodejs\node.exe E:\Test\helloworld\game-server\app.js env=development id=connector-server-1 host=127.0.0.1 port=3150 clientPort=3010 frontend=true serverType=connector locally
[32m[2013-03-23 21:19:26.066] [INFO] \node_modules\pomelo\node_modules\pomelo-admin\lib\consoleService.js - [39mtry to connect master: "master", "127.0.0.1", 3005 [2013-03-23 21:19:26.066] [INFO] \node_modules\pomelo\node_modules\pomelo-admin\lib\consoleService.js - try to connect master: "master", "127.0.0.1", 3005
[31m[2013-03-23 21:19:26.083] [ERROR] console - [39mFAILED TO RUN, return code: 1 [2013-03-23 21:19:26.083] [ERROR] console - FAILED TO RUN, return code: 1
[32m[2013-03-23 21:19:26.084] [INFO] console - [39m'C:\Program' 锟斤拷锟斤拷锟节诧拷锟斤拷锟解部锟斤拷锟筋,也锟斤拷锟角匡拷锟斤拷锟叫的筹拷锟斤拷 锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷
[2013-03-23 21:19:26.084] [INFO] console - 'C:\Program' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���
[32m[2013-03-23 21:19:26.333] [INFO] \node_modules\pomelo\lib\application.js - [39m"master-server-1" enter after start... [2013-03-23 21:19:26.333] [INFO] \node_modules\pomelo\lib\application.js - [32m[2013-03-23 21:19:26.334] [INFO] \node_modules\pomelo\lib\application.js - [39m"master-server-1" finish start "master-server-1" enter after start...
[2013-03-23 21:19:26.334] [INFO] \node_modules\pomelo\lib\application.js - "master-server-1" finish start
Your server is running fine.. You can check the status of the running server by opening a new command prompt. Then cd to the directory where your server is. Then type the command pomelo list That will list the status of the server.
EDIT: Please post your issues in english please. Most of us cant understand mandarin.
there just has the master-sever, the connect-server cann't be started..
E:\Test\helloworld\game-server>pomelo list serverId serverType pid heapUsed(M) uptime(m) master-server-1 master 3860 13.97 0.24
i solve the problem by flowing two steps: 1.chanage the game-server package.json "pomelo" dependencies from 0.3.4 to 0.3.3 2.change the game-server\node_modules\pomelo\node_modules\pomelo-logger package.json "log4js" from ">=0.5.3" to "0.5.7";
你这个问题是用空格的问题,你可以参考这里 https://github.com/NetEase/pomelo/commit/4877ef4ca48abb833a190101597c384ccfac7482
解决了window下面路径有空格的问题,现在又有新问题了
Error: No such module
at process.startup.processSignalHandlers.process.on.process.addListener (nod
e.js:480:27)
at Object.
@a289459798 Which version of node you are using? It seems fail on binding the system signal.
Thank you jp2002, "log4js": "=0.5.7" works!