I just finished cleaning my home folder out of the ~100,000 files npm created over the past couple of months. I just build interesting Node projects I come across to check them out and it's gotten that big. I wonder how it's like for regular node devs.
Sane dependency management isn't free! I have some tips, though:
# find how all node_modules on *nix under the cwd (gsort is for mac with homebrew coreutils; use `sort` otherwise)
find . -name "node_modules" -type d -prune -exec du -sh '{}' + | gsort -hr
# exclude node_modules from time machine backups
mdfind 'kMDItemFSName == node_modules' -0 | xargs -0 tmutil addexclusion
Doesn't the same apply to any nontrivial programming language / dependency management system that works from source? e.g. Go?
I mean Maven's repository is usually pretty big too. It's usually compiled .jars but IDE's can opt to download sources + documentation too. A lot of Java applications end up downloading half the internet too.
Long story short, any non-trivial development / library / framework / software has a lot of dependencies.
Sadly, this is one of the worst parts of Node.js development. Import one NPM package and it will import hundreds of other packages. The sad thing is that probably many of them are:
- no bigger than 50 lines of code
- probably "unpromified"
- probably unmaintained
I really like ECMAScript2016 and the concept behind Node.js, but the NPM ecosystem is really something that isn't pretty.
I just finished cleaning my home folder out of the ~100,000 files npm created over the past couple of months. I just build interesting Node projects I come across to check them out and it's gotten that big. I wonder how it's like for regular node devs.