npm 安装与卸载模块 随笔

1. 只卸载模块

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

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
npm uninstall lodash

2. --save 参数使用

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

npm uninstall lodash --save

3. 卸载指定版本的模块

npm uninstall lodash@3.*  // 卸载 lodash 模块 3.* 版本

 

npm install 模块 --save  (线上环境)
npm install 模块      (本地环境)
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄