北京网站建设 seo公司网页设计代码书
npm 默认镜像 :https://registry.npmjs.org/
 1、安装 nrm
npm install nrm --global
 

2、查看镜像源列表
 nrm ls
 

3、测试当前环境下,哪个镜像源速度最快。
nrm test
 

4、 切换镜像源
 npm config get registry # 查看当前镜像源
 nrm use taobao # 等价于 npm config set registry https://registry.npmmirror.com
 
5、使用 cnpm 或 yarn
npm install -g cnpm --registry=https://registry.npmmirror.com
 
cnpm install -g yarn
