numbcoder / json-comments

comments support for json in node.js
20 stars 1 forks source link

json-comments is not working with pomelo suitable. #1

Open xykong opened 10 years ago

xykong commented 10 years ago

As I use json-comments in my pomelo project by just simply 'require('json-comments');' in the application entrance at the top of app.js, the application is down. Without json-comments my application runs OK. I have no time to trace what is wrong with this module now. Show just post it here. The log:

[2013-12-17 17:17:17.486] [ERROR] pomelo - [...\game-server\node_modules\pomelo\lib\server\server.js] fail to forward message:TypeError: Cannot read property 'msgRemote' of undefined at doForward (...\game-server\node_modules\pomelo\lib\server\server.js:336:39) at dispatch (...\game-server\node_modules\pomelo\lib\server\server.js:102:7) at next (...\game-server\node_modules\pomelo\lib\common\service\filterService.js:50:7) at Service.beforeFilter (...\game-server\node_modules\pomelo\lib\common\service\filterService.js:65:3) at beforeFilter (...\game-server\node_modules\pomelo\lib\server\server.js:247:8) at pro.globalHandle (...\game-server\node_modules\pomelo\lib\server\server.js:111:3) at Component.globalHandle (...\game-server\node_modules\pomelo\lib\components\server.js:74:15) at handleMessage (...\game-server\node_modules\pomelo\lib\components\connector.js:249:15) at null. (...\game-server\node_modules\pomelo\lib\components\connector.js:199:5) at EventEmitter.emit (events.js:95:17)

numbcoder commented 10 years ago

I'm sorry to reply so late!

Could you show me your server.json?

taiguangyin commented 10 years ago

It will parse error if json file include chinaese string. chinaese string is disppaly "black" or "object"

numbcoder commented 10 years ago

@taiguangyin Could you show your json file to me ? I have add some chinese string to test , but not fail!

This is my test json https://github.com/numbcoder/json-comments/blob/master/test/comments.json

run:

npm test