切换npm 源地址, 我们可以这样
npm set registry=https://registry.npm.taobao.org/
切换到淘宝镜像
这样切换需要记忆的东西比较复杂,而且不方便管理
因此需要引入nrm
nrm 是一个 npm 源镜像管理器,快速切换npm 源地址
安装
npm install -g nrm 必须全局安装 -g
检查 nrm -V 查看版本,以及是否安装成功
安装成功
一些指令:
1.nrm ls 查看所有源地址, *表示当前使用的镜像地址。
2.nrm add 名称 地址
3.nrm use 名称(taobao )
4.nrm test 查看链接情况
5.nrm del 名称
完成!