DEV Community

Discussion on: How do you deal with node_modules?

Collapse
 
jwp profile image
John Peters • Edited

node_modules are the bane of everything. They bring in huge amounts of executable code which we know nothing about. They are full of dependencies, simple upgrades can cause lots of issue losing weeks of time. Error messages are ridiculous. etc. etc.

The way I deal with this is to really know the NPM commands, In particular NPM info pacakageName, and NPM ci (when things are bad). npm search helps. And knowing when to ignore peer dependency errors.

Also there are times to delete the package lock file as it has a memory which will override our intent.