Problem description
After the project is run and compiled, the problem of running interruption occurs frequently. You need to re execute the command yarn serve
Error content
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
The JS heap is out of memory
Cause analysis:
If the project is large, memory overflow will be thrown when starting or packaging, and the node server memory needs to be expanded
Solution:
Try method 1: Expand memory
Shortcut key Win+R to open the run window, run npm install -g increase-memory-limit 2. Run increase-memory-limit
in the project folder , the memory expansion is completed, and then start the project.
The situation is slightly better after the expansion, but the operation will be interrupted when throwing
CALL_AND_RETRY_LAST Allocation failed – JavaScript heap out of memory
Try method 2: Shortcut key Win+R to open the run window, run setx NODE_OPTIONS –max_old_space_size=4096
Subsequent operation is normal, no error is reported
Read More:
- [Solved] NPM Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- [Solved] Vue Project Modify Page Error: CALL_AND_RETRY_LAST Allocation failed – JavaScript heap out of memory
- [Solved] Project Package Error: Javascript heap out of memory
- [Solved] Vue Compile Error: JavaScript heap out of memory
- [Solved] Vue-cli3 running or packaging error: JS memory overflow
- Javascript: How to Use Date.Now() to implement front-end frequency limit
- ArcGIS API for JavaScript version 4. X updated and the project startup error: Module parse failed: Unexpected token(… …
- Javascript SecurityError: Failed to read the’localStorage’ property from’Window’: Access is denied for this document.
- [Solved] Vite Error: Failed to load module script: Expected a JavaScript module script but the server…
- JavaScript Common Errors List (Reasons & Solutions)
- [Solved] VS Code Debug JavaScript Error: “crbug/1173575, non-JS module files deprecated”
- Google browser plug-in JavaScript errors Notifier
- Javascript: js websocket disconnected reconnect library ReconnectingWebSocket
- Javascript: Simple package localStorge operation
- Error when Python executes JavaScript statement
- ArcGIS API for JavaScript Error Uncaught(in promise): TypeError: xxx is not a constructor
- [Solved] VUE3 Error: Error: ENOSPC: System limit for number of file watchers reached
- JavaScript determines whether parentheses are paired.
- JavaScript determines whether it’s morning or afternoon or evening
- Interface request error 504 gateway time out [How to Solve]