Front React server crash : node:internal/buffer:959

Viewed 50

I am building an ecommerce website using Strapi (back) and React (front).

I don't why i have the current error:

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

RangeError: Array buffer allocation failed at new ArrayBuffer () at new Uint8Array () at new FastBuffer (node:internal/buffer:959:5) at createUnsafeBuffer (node:internal/buffer:1062:12) at Function.allocUnsafeSlow (node:buffer:384:10) at read (C:\Users\lenoa\Documents\ELN WEB\Projets en cours\freedom-x\frontend\node_modules\webpack\lib\serialization\FileMiddleware.js:597:32) at C:\Users\lenoa\Documents\ELN WEB\Projets en cours\freedom-x\frontend\node_modules\webpack\lib\serialization\FileMiddleware.js:657:7
at C:\Users\lenoa\Documents\ELN WEB\Projets en cours\freedom-x\frontend\node_modules\graceful-fs\graceful-fs.js:362:16 at FSReqCallback.oncomplete (node:fs:188:23)

It happens when i am navigate on the website, i don't know why.

Thank you for your help !

2 Answers

Try to put after the response:

 await setTimeout(0) 

If this doesn't work, check out which Node version do you have. Maybe you need to install the node 64 and rebuild all de node modules.

Finally i figured it out. If you have the same issue : just uninstall Nodejs from your computer, then reinstall it. It work for me.

Have a good day !

Related