01nodejs基础 ---- npm使用技巧

npm升级package.json依赖包到最新版本号

1、安装:
npm install -g npm-check-updates
2、使用:
检查package.json中dependencies的最新版本:
ncu
更新dependencies到新版本:
ncu -u
更新全部到最新版本:
ncu -a

npm 设置淘宝镜像的两个方法

1. 永久使用
npm config set registry https://registry.npm.taobao.org
这样配置以后都是用淘宝的镜像下载资源 国内的访问速度会比较快
2. 直接安装使用
npm install -g cnpm --registry=https://registry.npm.taobao.org

posted @ 2020-04-30 21:03  Vzf  阅读(164)  评论(0编辑  收藏  举报