由于镜像地址问题,使用npm直接进行安装进度极其缓慢,这时候切换npm的镜像地址会使得速度加快很多。于是可以切换镜像地址解决安装缓慢的问题。一般我们习惯性切换为淘宝镜像地址。 切换到淘宝镜像 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 结果如下