How to Uninstall NPM Packages from a Node.js Project

Опубликовано: 26 Январь 2021
на канале: Hey Node
6,293
54

See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/how-unin...

Removing a dependency from a project is a 2-step process. First, you must delete the dependency from your node_modules/ folder, and second, remove its listing from your package.json. This ensures the package is fully removed. Instead of performing this task manually, we can use the npm uninstall command.

In this tutorial we'll:

- Use npm uninstall to remove dependencies from a project
- Learn how to uninstall global packages
- Use npm prune to remove any untracked modules from the node_modules/ directory

Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.