gpt4 book ai didi

javascript - 范围错误 : Invalid array buffer length - Meteor JS

转载 作者:IT老高 更新时间:2023-10-28 13:29:29 25 4
gpt4 key购买 nike

当这个错误开始出现时,我只是在编码(Meteor JS),我什至不确定是什么原因造成的:

buffer.js:25                                                                      
const ui8 = new Uint8Array(size);
^
RangeError: Invalid array buffer length
at new ArrayBuffer (native)
at new Uint8Array (native)
at createBuffer (buffer.js:25:17)
at allocate (buffer.js:96:12)
at new Buffer (buffer.js:56:12)
at increaseBufferIfNecessary (C:\Users\admin\AppData\Local\.meteor\packages\meteor-tool\1.4.0-1\mtos.windows.x86_32\dev_bundle\lib\node_modules\stream-buffers\lib\writable_streambuffer.js:58:23)
at [object Object]._write (C:\Users\admin\AppData\Local\.meteor\packages\meteor-tool\1.4.0-1\mtos.windows.x86_32\dev_bundle\lib\node_modules\streambuffers\lib\writable_streambuffer.js:65:5)
at doWrite (_stream_writable.js:300:12)
at writeOrBuffer (_stream_writable.js:286:5)
at [object Object].Writable.write (_stream_writable.js:214:11)
at Request.ondata (stream.js:31:26)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous
(C:\Users\admin\AppData\Local\.meteor\packages\meteor-tool\1.4.0-1\mtos.windows.x86_32\dev_bundle\lib\node_modules\request\request.js:1255:12)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at IncomingMessage.Readable.push (_stream_readable.js:111:10)
at HTTPParser.parserOnBody (_http_common.js:124:22)
at TLSSocket.socketOnData (_http_client.js:320:20)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at TLSSocket.Readable.push (_stream_readable.js:111:10)
at TLSWrap.onread (net.js:536:20)

我试过 npm cache clear 但没有帮助。什么可能导致此错误?是我的代码还是别的什么?

最佳答案

我在 Windows 10 中,并且在 meteor 开始自动更新后我也收到此错误。

这就是我所做的:

1) 我删除了 dirs node_modules 和 .meteor/local:

rm -rf node_modules
rm -rf .meteor/local

2) meteor npm install

3) 使用以下命令运行 meteor :meteor

更新

在尝试上述方法并运行 meteor 之后,它可以工作,但过了一段时间它开始出现同样的错误。因此,我在某处阅读以在 Windows 中再次卸载和安装 meteor ,从而解决了错误。如果遇到此错误,请尝试卸载并重新安装它

关于javascript - 范围错误 : Invalid array buffer length - Meteor JS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38908222/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com