npm修改为国内镜像源
- 日期 : 2018-02-03
npm在安装时候奇慢无比,npm,也像Linux的软件一样,默认是国外的源,现在要修改为国内镜像源

下面就是切换npm镜像源的方法有三种:
1.通过config命令
npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)
2.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
3.编辑~/.npmrc加入下面内容
registry = https://registry.npm.taobao.org 修改后,执行安装命令,速度是不是就飞快了,更多建网站需要多少钱,请关注我们