简体   繁体   中英

react development server keeps crashing

am trying to build an ecommerce website to practice more on react. I have bunch of frameworks i installed for my react project, but recently, running react in localhost keeps crashing with this error info-

node:internal/buffer:959
    super(bufferOrLength, byteOffset, length);
    ^

below is a description of the error

node:internal/buffer:959
    super(bufferOrLength, byteOffset, length);
    ^

RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at new Uint8Array (<anonymous>)
    at new FastBuffer (node:internal/buffer:959:5)
    at createUnsafeBuffer (node:internal/buffer:1062:12)
    at Function.allocUnsafeSlow (node:buffer:385:10)
    at new Uint8Array (<anonymous>)
    at new FastBuffer (node:internal/buffer:959:5)
    at createUnsafeBuffer (node:internal/buffer:1062:12)
    at Function.allocUnsafeSlow (node:buffer:385:10)
    at read (C:\Users\HP-PC\Desktop\react\ecom\node_modules\webpack\lib\seri
alization\FileMiddleware.js:597:32)
    at C:\Users\HP-PC\Desktop\react\ecom\node_modules\webpack\lib\serializat
ion\FileMiddleware.js:657:7
    at C:\Users\HP-PC\Desktop\react\ecom\node_modules\graceful-fs\graceful-f
s.js:362:16
    at FSReqCallback.oncomplete (node:fs:188:23)

I have uninstalled and re-installed my node.js(based on a proposed solution i saw online), but am still getting the error.

try to npm update to update modules, if failed try to remove webpack and graceful-fs

incase someone runs into this error in the future, just update your node version and manage it with nvm. that helped me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM