环境:
- LeanEngine Node.js
leanengine@0.1.4
- 在本地使用
avoscloud
命令运行
代码:
fs.readFileAsync(file.path)
.then(function (buffer) {
app.add('screenshots', new AV.File(file.name, buffer))
return app.save()
})
报错(保密原因我已将我自己的路径隐藏):
<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:5132
var json = JSON.stringify(value);
^
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at _.extend._resetCacheForKey (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:5132:25)
at <my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:4885:20
at <my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:1909:9
at Array.forEach (native)
at Function._.each._.forEach (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:83:11)
at Object.AV._objectEach.AV._each (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:1908:9)
at _.extend._refreshCache (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:4881:10)
at _.extend.save (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:5555:13)
at <my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:5566:24
at wrappedResolvedCallback (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:3872:40)
at <my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:3795:26
at Array.forEach (native)
at Object._.each._.forEach [as _arrayEach] (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:83:11)
at _.extend.resolve (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:3794:10)
at wrappedResolvedCallback (<my project>/node_modules/leanengine/node_modules/avoscloud-sdk/dist/av.js:3882:27)