24
hack
2y

$ npm install ...
$ added 10 packages from 7 contributors and audited 21813 packages.

I realized that after some point you don't even think about your project dependencies growing. Because even adding 10 packages, it looks like it doesn't even changes the total number of packages. 21813, 21920, 21980... Does it even matter? Fuck.

Comments
  • 5
    Sometimes I just wonder, how did it become so bad. Where did we stray from the way.. 🙈
  • 4
    I am hard pressed to i initialize packages when dealing with node.
    Last big project I had did not require more than Express and the mysql package.
    The thing remains minimal, most of the shit I do with node remains extremely minimal and most of the code I write myself.

    I would venture to say that most Node web stacks or enterprise level tools remain that way: minimal. It is only when we start downloading packages from other devs that we see how fucked up it can get.

    Funny how in Node the community can really kill it sometimes.
  • 1
    @AleCx04 yes I prefer minimalism too. Its easier to maintain that way. I did not added 21k packages by myself. I didn't run npm install packageName more than 6 times but look what I got now. Btw this is an electron + angular app.
  • 1
    Sorry, I don’t know all your project’s details but have you looked into:

    npm prune

    Or maybe or on top of:

    npm outdated

    Maybe research npm shrinkwrap. It helps sync what you want in node_modules through the package.json.

    With 21,000 it sounds you are running defaults for npm install and node_modules. How many packages are in the package.json?
  • 1
    I keep getting after other engineers for blindly importing packages for no reason.

    If you import that, you now own it’s dependency chain... have you audited everything in its chain?

    Do you even need to use a library there? Or should you roll your own?
  • 0
    @CaptainKirk thanks for suggestion. npm prune didn't changed anything. I have 33 devDependencies and 21 dependencies on my packages.json.

    @arun I started that projec with a angular + electron project template and inherited packages. I started new project with same template and it has 23722 packages in it. So thats not my fault :P
  • 0
    Won’t going to fly in my team.
    Anyone who pulls 100 dependencies for something which can be done in less than 1 hour is fired on the spot
Add Comment