NPM设置淘宝镜像
目录
淘宝npm镜像是国内最大的,访问速度快的npm镜像,设置方法如下:
-
编辑 ~/.npmrc
1registry = http://registry.npm.taobao.org -
by config command
1 2npm config set registry http://registry.cnpmjs.org npm info underscore (如果上面配置正确这个命令会有字符串response) -
命令行指定
1npm --registry http://registry.cnpmjs.org info underscore