Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The node_modules folder with its tenths of thousands of files is killing my ssd!

as it is present in every node project I have, and consumes a gigantic number of io operations.

Thus I’m very glad that deno didn’t continue this tradition.



Replace ‘node_modules’ with ‘deno cache’ and presto! you’re in the future.


Yarn already removes the need for node_modules without requiring to change interpreter and APIs, though.


Not true

deno cache contains only the js files, and each one of them includes all its dependancies in the same file.

OTOH node modules contains every package in the dependency tree, and each package has many files not related to the required js file.


You might as well live without GUI as those involve "gigantic" amount of IO as well.

Why are people being so sensitive with hardware resource? Like how Electron is killing your machine...


ssd has limited number of write operations, while node_modules writes many many files to the disk.

And as mentioned in the article you repeatedly remove and recreate it to fix “problems”


Even with write amplification a node_modules is not typically going to cause more than a few gigabytes write load. So with max TBW being somewhere in the hundreds of terabytes for current SSD, we're looking at hundreds of thousand node_module rewrites before the drive gives.

Unless you're rewriting your node_modules every other minute on an old SSD I recommend finding something else to worry about.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: