references
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Vue-cli3 nodejs memory overflow problem when executing serve and build commands and solving the
problem of startup error due to insufficient memory provided by vue project
error message
The error message when compiling is as follows
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Approach
- Install cross-env increase-memory-limit
npm install -D cross-env increase-memory-limit
- Configure in the script in package.json
"scripts": {
"limit": "cross-env LIMIT=8192 increase-memory-limit"
},