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

时间:2019-05-26 16:26:35

标签: node.js

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

1 个答案:

答案 0 :(得分:0)

使用命令:

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:全局删除

相关问题