Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

在Treasures例子中启动game-server时报错 #152

Closed
peiweippww opened this Issue Mar 22, 2013 · 4 comments

Comments

Projects
None yet
5 participants

错误如下:
/treasures/game-server/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 (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:290:26)
at /data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:145:13
at Array.forEach (native)
at configureAppenders (/data/work/peiwei/
treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:144:22)
at configureOnceOff (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:196:13)
at Object.configure (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:256:5))
at configureOnceOff (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/log4js.js:205:19)
at Object.configure (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/node_modules/
log4js/lib/log4js.js:256:5)
at Object.configure (/data/work/peiwei/treasures/game-server/node_modules/pomelo-logger/lib/logger.js:46:9)
at Object.module.exports.configure (/data/work/peiwei/treasures/game-server/node_modules/pomelo/lib/util/log.js:9:10)
at configLogger (/data/work/peiwei/treasures/game-server/node_modules/pomelo/lib/util/appUtil.js:153:9)
at Object.module.exports.defaultConfiguration (/data/work/peiwei/treasures/game-server/node_modules/pomelo/lib/util/appUtil.js:14:3)
at Object.Application.init (/data/work/peiwei/treasures/game-server/node_modules/pomelo
/lib/application.js:55:11)
at Object.Pomelo.createApp (/data/work/peiwei/treasures/game-server/node_modules/pomelo/lib/pomelo.js:67:7)
at Object. (/data/work/peiwei/treasures/game-server/app.js:8:18)
at Module._compile (module.js:449:26)

在 game-server 目录下建立一个 logs 文件夹 试试

不行的,我重新安装了下pomelo,然后init下,在game-server下pomelo start也是报这个错,在game-server下有logs文件夹

请问解决了嘛?我的也报这个错!!!有logs文件夹的

Contributor

ETiV commented Mar 27, 2013

cd /treasures/game-server/node_modules/pomelo-logger/
vim package.json

    // 找到 "log4js":, 冒号后面双引号里的改成 0.5.7
    "log4js":"0.5.7"
    // :wq

npm install -d

cd /treasures/game-server/
pomelo start

@xiecc xiecc closed this Apr 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment