The first time the npm run serve ran, there was no error. After the change file was saved, it was automatically repackaged and an error was reported: FATAL ERROR: Retrieved heap limit Allocation failed – JavaScript heap out of memory, as shown in the following figure:
Problem: Too many resources were referenced, Causing node memory overflow
Solution:
1. Global installnpm install - g increase memory-limit
2. Execute increase-memory-limit
3. Run the project npm run serve
If it appears after running:
“node –max-old-space-size=10240″‘ is not an internal or external command, nor is it an executable program or program file
Search for “%_prog%” in the .bin file in the node_modules directory and replace it all with %_prog%
If no file is found, click the ignored file button
to replace it and run: npm run serve
It will be OK!
Read More:
- [Solved] NPM run build package error: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] Build Error Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of me
- Solve Error: call_and_retry_last allocation failed – javascript heap out of memory
- [Solved] Hexo FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- [Solved] NPM Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- PyCharm Error: RuntimeError: CUDA out of memory [How to Solve]
- [Solved] RuntimeError: CUDA error: out of memory
- Impala Find Error: InternalException: Memory limit exceeded: Error occurred on backend
- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
- How to Solve Git error: out of memory
- IDEA reports an error Could not reserve enough space for xxxxKB object heap processing
- [Solved] Error during composer operation in docker: insufficient memory
- [Solved] redis Error: Can‘t save in background fork Cannot allocate memory
- failed to obtain in-memory shard lock [How to Solve]
- [Solved] Nacos Cluster startup error: error=‘Cannot allocate memory‘ (errno=12)
- [Solved] OpenCV Train the class Error: Bad argument & Error: Insufficient memory
- [Solved] Neo4j Error: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes spec
- [Solved] kettle Error: GC overhead limit exceeded
- How to Solve k8s Nodal issues: /sys/fs/cgroup/memory/docker: no space left on device\““: unknown.