RangeError:无效的数组缓冲区长度 - Meteor JS [英] RangeError: Invalid array buffer length - Meteor JS

查看:265
本文介绍了RangeError:无效的数组缓冲区长度 - Meteor JS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当这个错误开始出现时,我只是编码(Meteor JS),我甚至不确定是什么导致它:

I was just coding (Meteor JS) when this error started to crop up, and I'm not even sure what caused it:

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 但它没有帮助。可能导致此错误的原因是什么?这是我的代码还是别的什么?

I've tried to npm cache clear but it hasn't helped. What could be causing this error? Is it my code or is it something else?

推荐答案

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

I'm in windows 10 and I also get this error after meteor started auto updating.

所以这就是我所做的:

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

1) I remove dirs node_modules and .meteor/local:

rm -rf node_modules
rm -rf .meteor/local 

2) meteor npm install

3运行流星: meteor

在尝试了上面的并且运行流星之后它工作了但是过了一段时间它开始测试同样的错误。所以我在某处阅读了卸载并在Windows中再次安装meteor并解决了错误。如果遇到这个错误,可以尝试unistalling并重新安装

After trying the above and running meteor it worked but then after some time it started thworing same error. So I read somewhere to uninstall and install meteor again in Windows and that solved the error. Maybe try unistalling and installing it again if facing this bug

这篇关于RangeError:无效的数组缓冲区长度 - Meteor JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆