【发布时间】:2019-10-12 09:32:09
【问题描述】:
如何在 node.js 中卸载带有 dev 依赖的 npm 模块?
【问题讨论】:
-
除非他正在寻找
npm prune --production。也许将此作为第五点添加到您的列表中? -
@Hasara,如果它解决了你的问题,你能接受我的回答吗?
标签: node.js
如何在 node.js 中卸载带有 dev 依赖的 npm 模块?
【问题讨论】:
npm prune --production。也许将此作为第五点添加到您的列表中?
标签: node.js
使用命令:
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: 全局删除
【讨论】: