如何在 node.js 中卸载具有开发依赖项的 npm 模块?

Has*_*ara 11 node.js

如何在 node.js 中卸载具有开发依赖项的 npm 模块?

Dee*_*ire 16

使用命令:

1)npm uninstall <name of the module>

你也可以使用:

1) npm uninstall <name of the module>: 从 node_modules 中删除模块,而不是 package.json

2) npm uninstall <name of the module> --save: 也将其从 package.json 中的依赖项中删除

3) npm uninstall <name of the module> --save-dev: 也将它从 package.json 中的 devDependencies 中删除

4) npm -g uninstall <name of the module> --save: 全局删除