npm 安装与卸载模块

1. 只卸载模块

由于之前安装过,在 package.json 中的记录仍然存在

npm uninstall lodash

2. --save 参数使用

卸载模块的同时删除在 package.json 文件中的记录

npm uninstall lodash --save

3. 卸载指定版本的模块

npm uninstall lodash@3.*  // 卸载 lodash 模块 3.* 版本
npm install 模块 --save  (线上环境)
npm install 模块      (本地环境)

猜你喜欢

转载自www.cnblogs.com/dianzan/p/10875418.html