package installation gets killed

Hi Team ,

I am trying to install some packages but every time process gets killed . More details are here.

Please help…

Thanks Trivender

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Based on the information you provided, that npm is crashing or killing it’s sub-processes during this install but not at the same point each time the most likely cause is that your droplet is running out of available memory to complete the installation process. This is especially likely if you are running a 512MB droplet.

Droplets do not ship with swap configured by default. This means that if the physical memory available to it is used up it will not buffer memory to the disk, instead processes may be killed.

There are two potential solutions for this issue:

1.) Upgrade to a droplet with more RAM. This will provide the best performing solution for this problem as RAM is much faster than swap.

2.) Create a swap file on your droplet. The installation and other process that have to use the swap space will run slower than they would in physical memory but this should prevent the process from being killed.

Hello all,

I will also recommend adding a swap file. You can check our tutorial on How To Add Swap Space on Ubuntu 20.04

If you’re still having issues you can use tools like top to monitor the processes on your server and see if a service is using way too many resources.

Regards, Alex