npm切换到淘宝镜像及切换回原镜像
文章介绍用 npm config set registry 命令把 npm 镜像切换为淘宝镜像以加速依赖下载,恢复时改回官方默认地址;另外可安装 nrm 工具,通过 nrm ls 查询其他可用镜像地址。
切换到淘宝镜像
npm config set registry http://registry.npm.taobao.org
切换回原镜像
npm config set registry https://registry.npmjs.org
其他镜像地址查询
安装nrm
npm install nrm -g
使用nrm查询镜像地址
nrm ls
评论