查看自己的镜像源:
npm config get registry
由于官方的镜像服务器在国外,导致下载速度慢,现将镜像源切换到国内的,提高下载速度:
npm config set registry https://registry.npm.taobao.org
切回官方镜像源:
npm config set registry https://registry.npmjs.org
npm config get registry
npm config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npmjs.org