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

What's the boilerplate involved with nested node_modules? Theoretically, it's a waste of hard drive space, but that's rarely a concern.


Just the tend to take a simple function, then ship it as a package. There's overhead in having a manifest, a folder, a separate code file, tests maybe, readme.md, etc. (Or in some cases, an meme-related animated gif that's referenced in the readme, that's larger than the rest of the package combined. Neato!)

It's obviously dumb from a technical perspective to break out individual functions (or even 20-100 line code files) into separate modules. But I think some folks really enjoy it.

Just like the Java or C# folks that put every single type definition into its own file. So you get some lame IHasFoo with a single bool property - so really 1 or 2 lines of actual code. Along with comments and a file header etc. Same for groups of enums, etc.


Are you also loading multiple versions of the same library in memory, or multiple versions with only a small minor version difference?

There are also legacy windows bugs that make long file names not work when you have a bunch of nested node_modules folders.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: