NPM is great tool to have all your Node modules in your front end project, and don’t have to worry about dependencies.
When you find a useful module for your project just do ‘npm install <node-module> –save-dev’ and you are ready to go, but….. it can pollute your node_modules directory with unused node modules.
Just uninstall your unused node module by ‘npm uninstall <node-module>’
Tags: development, npm
So true; it’s such a simple thing to overlook and it has burned be in the past. I really like the VS Code extension for npm support, which will highlight any node deps that are detected as unused in package.json. Also, especially if you work with a CI environment (and may be caching your node_modules dir), running `npm prune` will remove extraneous packages from node_modules.
https://github.com/Microsoft/vscode-npm-scripts
Thanks for the useful VS Code add on