DEV Community

Discussion on: Delete node_modules like a Pro

Collapse
 
matthijsewoud profile image
⚡️ • Edited

Doesn't npm intelligently link already-installed-elsewhere modules? If so, deleting node-modules folders might be detrimental.

Edit: whoops! I was wrong about this one, sorry gang. Maybe I got it confused with Yarn or some other package managers? If anyone knows more about this, that'd be awesome; I feel bad about having loads of copies of the same module at multiple locations on my system.

Collapse
 
pahund profile image
Patrick Hund

That's the first time I'm hearing this. To my knowledge, every npm project has its own node_modules directory and every package dependency is installed per project. Do you have a link that documents what you are suggesting?

Collapse
 
tisdadd profile image
Michael Adsit

This was my first time hearing this as well. I know that pnpm is meant to do so.

Some comments have been hidden by the post's author - find out more