Skip to content

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

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xykong opened this issue Dec 17, 2013 · 3 comments
Open

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

xykong opened this issue Dec 17, 2013 · 3 comments

Comments

@xykong
Copy link

xykong commented Dec 17, 2013

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
Copy link
Owner

I'm sorry to reply so late!

Could you show me your server.json?

@taiguangyin
Copy link

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

@numbcoder
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants