Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Node.js node memory overflow. Is there any good solution?
Node.js node memory overflow. Is there any good solution?
This is good in the test environment, but when it comes online, the following error will appear:

Fatal error: CALL_AND_RETRY_LAST allocation failed-JavaScript heap is out of memory.

I looked it up online, and most of them said to set the value of -max _ old _ space _ size, but how do I know?

What is the default value of max _ old _ space _ size? Are you online when you set it up?

I found this. Compared with projects, compilation requires several gigabytes of memory.

If it is 32-bit, please replace the 64-bit node.

I modified it in package.json

" pro ":" node-max _ old _ space _ size = 8000 build/build . js "