79

I just hate npm dependencies.

If you want to write a small website with npm dependencies (some frontend deps like Bootstrap and some development deps like gulp or babel) you will have more npm dependencies in your project than own code. It is ridiculous, how some lazy developers just add dependencies to their projects, without evaluating their dependencies. The source code of one of my projects is around 4MB (without any dependencies). If you then run yarn as required, it grows to around 80MB (where 73MB are node_modules).

This is just terrible.

I rant about this, as I made the mistake to upload my node_modules directories when restoring a backup of my server. Worst idea one could ever have.

Comments
  • 7
    Reason why i use cdn services instead, #8473
  • 5
    I was working on a small angular-project while commuting, using my phone as a hotspot and made the mistake running 'npm install'. My laptop sounded like a starting airplane for a solid 3 minutes and pulled around 150MB of data...
  • 22
    - dependencies !== devDependencies
    - dont add every shitty library
    - use tree shaking
    - shitty devs make shitty packages avoid them by checking the peer deps
  • 5
    @Hammster first tip is sooooo critical. Well said. 👍
  • 4
    @Hammster you sir deserve a 🎖️
  • 3
    Lazy people, ehh? 🙈😂
    Don't get me wrong, I'm not the leftpad guy, but seriously...
    Please don't use anything that's been made in the last 5 years, use jQ with cdns, and always reinvent the wheel! Because, you know... No one's as smart as you are.
    Also pls try to make sure your code doesn't get out there...
  • 3
    lemme take a guess: 10MB of that is fsevents
  • 6
    @Hammster exactly what I was going to say. Plus assets are usually 'complied'/build and minified these days so devDependencies are not included in the built files. And there's multi project package management tools like lerna and bolt ;) soooooo ya know.
  • 0
    and if you go trhough the modules you will find lyric.
Add Comment