Question

npm/yarn install killed during process

I’m running an Ubuntu droplet, and have a simple react app I want to test. However, when I pull in my code from git and npm install in the react app (I have tried yarn, it gets killed in the middle too), It dies suddenly in the middle of the install, and just says ‘killed’. I tried getting verbose logs, and it goes from cache hits to a bunch of cache misses at some arbitrary point before getting killed.

I suspect maybe my droplet doesn’t have enough memory for this since react has so many dependencies, but want to make sure before I upgrade.

Node version: 18.7.0 NPM version: 8.18.0


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I bit the bullet and upgraded from a 512 mB RAM droplet to 1 GB RAM after looking at my metrics, and it solved it.

Bobby Iliev
Site Moderator
Site Moderator badge
April 16, 2023

Hi there,

Happy to hear that you’ve got it all working after upgrading to a 1GB RAM Droplet!

Another thing that you could consider is adding a swap file so that you could have some extra buffer:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.