21

I currently have 5168 node_modules folders on my computer.
Not 5168 folders inside node_modules, but 5168 actual node_modules folders.

That's all. That's the rant.

Comments
  • 12
    that's 5168 too many.
  • 1
    At one point there was an alternative to npm that tried to remedy just that - installing duplicating packages in a central place, then symlinking them to each project accordingly. I think this was pnpm. I haven't checked it out recently, but it might be worth a shot.
  • 0
    @kamen you could just install them globally and then you don't have to symlink anything lol
  • 1
    @jonas-w This would only work for binaries that you'd expect to call with npx for example. In all other cases things will blow up when you try to build the project.
  • 0
    @kamen didn't npm shot down that approach for security reasons?
  • 0
    @IntrusionCM I don't remember, but it's possible, yes.
  • 0
    @kamen I tried this but it fucked some of my projects sadly
  • 0
    @Jifuna Fucked in what way? Something that's not fixable by rolling back a few commits and/or redoing a build?
  • 0
    @kamen Not exactly sure but the syslinks didn't work well I suppose because it wouldn't build and told me it couldn't find packages
  • 0
    @Jifuna Wipe node_modules, do an npm install anew and try again.
  • 0
    @kamen i did :(, but it was like 2 years ago so maybe it has improved. For now I'm fine with just using npm :P
  • 0
    Just use deno.
  • 1
    Kill them. Kill them all.

    cd ~ && find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
Add Comment