一、FATAL ERROR: Zone Allocation failed - process out of memory
When I got up to pack the vue project this morning, I found that it couldn't be packed, and a data error was reported : area allocation failed - insufficient process memory;
After investigation, it was found that: node memory overflow problem.
In order to solve this problem, I can pack after running 2 commands
1. First, download the npm package globally
npm install -g increase-memory-limit
2. Enter the project directory and execute:
global installation: increase-memory-limit
Explanation: It is used to set the memory that the node process can occupy, and solve this problem by setting a large memory occupation
二、node --max-old-space-size=10240
Not long after, due to the big changes in the code, I was going to run it again, and then there was a problem again, and the report was "node --max-old-space-size=10240" is not an internal or external command, nor is it a runnable program or batch file.
The reason is: there is something wrong with the 2 lines of commands executed to solve the memory overflow problem.
Solution: Delete the node_modules dependency and download it again. Download command ( npm i/npm install )