【发布时间】:2016-05-18 13:55:42
【问题描述】:
我正在使用 node.js 和 fs.writeFile() 将 JSON 写入文件,大约 1-2.5MB 的数据,但有时它会给我这个错误;
TypeError: Method Uint8Array.length called on incompatible receiver [object Object]
at Buffer.get length (native)
at writeFd (fs.js:1207:45)
at fs.js:1198:7
at FSReqWrap.oncomplete (fs.js:82:15)
我不知道为什么或如何,也不知道如何解决它。任何帮助表示赞赏。
【问题讨论】:
标签: javascript node.js