Hi there,
I have a very simple React app hosted in a droplet with these properties: 1 GB Memory / 25 GB Disk / NYC1 - Ubuntu 20.04 (LTS) x64
I’m trying to run a simple “npm run build” and it takes a lot of time, and I’m not able to complete the tasks.
What can be the problem? Should I pick a bigger droplet?
Thanks.
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!
In the past when I’ve encountered issues with npm, I like to do a force clear of the npm cache (npm cache clean --force) or run a rebuild (npm rebuild). Then after that, I’d run my script again.
This may or may not solve your problem, but the goal is to kind of reset your npm environment so you can start troubleshooting what the real problem could be (i.e. the node_modules, the build script, etc).
If you’re questioning the value of increasing the size of your droplet, you might want to assess how much processing power your app needs. If it’s just a simple React app, I wouldn’t imagine that it would need much more than what you’re using.
Heya, @sergiogregorutti
Have you added swap to the droplet? You can check this article here:
https://www.digitalocean.com/community/tutorial-collections/how-to-add-swap-space
Once the swap is added, give it another try.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.