How to Remove All the node_modules Folders Content

Save Disk Space by Deleting Unnecessary node_modules Folders Recently, I needed to transfer a folder filled with old projects to a new computer. When I tried compressing it, I was surprised to find that its size was a whopping 8GB. Quite excessive for simple coding projects that mainly consist of text files. Since all the projects were written in JavaScript, each one had a node_modules folder. However, these folders are completely unnecessary because they can be regeneratd by running npm install within each project....

Linux: Troubleshooting \"No Space Left on Device\" Error

Recently, I encountered a perplexing issue on my Linux Ubuntu server. To investigate the problem, I accessed the server and checked the Apache error log located in /var/apache2/error.log. To my dismay, the log was inundated with numerous instances of the dreaded “No space left on device” error. Apprehension set in as I pondered how this could have happened. To get a better understanding of the situation, I decided to run the df command, which confirmed my suspicions - the disk was completely full....

What is pnpm? A Disk Space Saving Replacement for npm

Introduction to pnpm, a drop-in replacement for npm that helps reduce disk space usage. In a previous blog post, I discussed the issue of having huge node_modules folders and how it doesn’t necessarily have to be a bad thing. However, finding ways to reduce our hard drive consumption is always a plus, especially considering that newer computers in 2019 are shipping with smaller SSD drives. One way to address this is by centralizing the storage of library code and sharing it across all the projects we work on....