Quantcast
Channel: How can I uninstall npm modules in Node.js? - Stack Overflow
Viewing all articles
Browse latest Browse all 54

Answer by Vishnu Mishra for How can I uninstall npm modules in Node.js?

$
0
0

To uninstall the Node.js module:

npm uninstall <module_name>

This will remove the module from folder node_modules, but not from file package.json. So when we do npm install again it will download the module.

So to remove the module from file package.json, use:

npm uninstall <module_name> --save

This also deletes the dependency from file package.json.

And if you want to uninstall any globally module you can use:

npm -g uninstall <module_name> --save

This will delete the dependency globally.


Viewing all articles
Browse latest Browse all 54

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>