I know there are already lots of questions about this problem, but I simply can´t believe I´m running out of memory.
npm run dev
> [email protected] dev /usr/www/users/****/****
> node build/dev-server.js
> Starting dev server...
ℹ 「wdm」: wait until bundle finished:
Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! [email protected] dev: `node build/dev-server.js`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /usr/home/****/.npm/_logs/2018-11-11T02_31_12_055Z-debug.log
Running "free -g" return:
total used free shared buff/cache available
Mem: 31 1 18 0 10 28
Swap: 3 0 3
I can also post the debug log if that would help..
First, you need to run the npm cache clean --force command to clear the npm cache. The --force flag is required because npm will refuse to clear the cache without it. Next, you need to remove the package-lock. json and npm-shrinkwrap.
You need to make sure you have a package. json file right in the current directory where you run the command. Once you see there's a package. json file in the output as shown above, then you can run the npm install command.
This usually happens if OOM killer (https://linux-mm.org/OOM_Killer) ends a
process due to RAM shortage.
Can you post the output of free -m
before running the build.
I would suggest to have at least 512M RAM available when building the node.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With