May 11, 2019
Just a quick tip to help you out, if you’re running into the same issue like me. We’re currently building a pretty big Application based on Nuxt.js During the compiling Nuxt crashed on almost each save with the error message
This issue was also mentioned on Github, but without a proper solution.
So the problem was that Node was running out of memory, to solve the Application from crashing, just incraese the memory limit. Node.js default memory limit is set to 1.7GB, so we increased it to 4GB.
With the parameter
--max-old-space-size=4096 you can increase the memory limit for Node.js Just add the above parameter
dev script in your package.json.
"dev": "cross-env NODE_ENV=development PORT=3333 nodemon --max-old-space-size=4096 server/index.js --watch server",
After we increased the memory limit the application did not crashed anymore.