I want to host my node.js app on Google Compute Engine, with the lowest CPU possible (1 vCPU, 0.6GB). However, it seems that because this is so poor in either or both of its performance and memory, when I tried to run npm install --production
on the VM via SSH, the installation just keeps hunging up for long, and then it is killed:
$ npm install --production
cloneCurrentTree → gunzTa ▐ ╢██████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
Killed
The first line is my command and the last two lines are the output. I tried it on another, slightly more superior VM (1 vCPU, 1.7GB) and the installation worked without any problems. I tried both of them two times at each VM, for your information.
So my question is: Is it possible to npm install
on the extremely poor machine environment?
I had that problem on a 512 MB RAM server. You have to enable SWAP so that the server uses hard drive for storing tmp data when it runs out of RAM.
Read how to do that
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