2 nihaoxingxing888 nihaoxingxing888 于 2016.01.23 15:22 提问

Converting circular structure to JSON错误

在运行pomelo的时候,提示

 at Object.stringify (native)
    at util.js:41:30
    at String.replace (native)
    at Object.exports.format (util.js:35:23)
    at formatLogData (/home/game/GangCreed/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/layouts.js:39:22)
    at colouredLayout (/home/game/GangCreed/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/layouts.js:108:7)
    at Logger.<anonymous> (/home/game/GangCreed/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/appenders/console.js:8:16)
    at Logger.emit (events.js:95:17)
    at Logger.log (/home/game/GangCreed/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/logger.js:58:10)
    at Logger.(anonymous function) [as warn] (/home/game/GangCreed/game-server/node_modules/pomelo-logger/node_modules/log4js/lib/logger.js:77:30)

3个回答

devmiao
devmiao   Ds   Rxr 2016.01.23 23:25
rui888
rui888   Ds   Rxr 2016.01.24 15:41
u012904399
u012904399   2017.08.14 23:56

循环引用产生的问题,把对象里数据取出来给新的对象试试

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!