I want to put my Nuxt project online at my hosting, but I encounter the problem that "npm run build" does not succeed. I get the following error:
node_modules/html-webpack-plugin/lib/cached-child-compiler.js:267:53
Nuxt Fatal Error
Error: spawn ENOMEM
I then received a report from my hosting that I've reached my limits. My first guess was that I had reached memory limits but when I look at the "Resource Usage" in DirectAdmin it reaches the NPROC limit of 100. So the max number of processes is reached.
How can I fix this?
What I've already tried:
- Downgrading Nuxt to 2.12.2
- Removing most of the plugins (there are not many yet though)
- Build the project at Netlify to test (which works without any problems). It also works well on my mac.
What I've already tried when I still thought it was memory limit
I tried a lot of things but these are the things I still remember
- Remove node_modules, package.json, package.lock.json etc. over and over and over gain ;-)
- --max-old-space-size=4096
I'm relatively new to setting up such a project so please be nice if I say something stupid ;-)
Thanks in advance!