Visual Studio 中设置npm

https://blog.csdn.net/wdyday/article/details/78062525

VS2017自带的npm会去国外的镜像下载文件, 奇慢无比, 还是马云家淘宝的镜像适合国内用户.

淘宝npm镜像地址:  https://registry.npm.taobao.org


VS中使用淘宝npm镜像, 需要以下两步:

步骤1.  修改npm config, 指向淘宝npm镜像, 有3种方法:   

1.通过config命令

扫描二维码关注公众号,回复: 3130460 查看本文章
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

步骤2.  修改 VS 的 Web Package Management

            如图, 添加以下三项, 然后就可以愉快的在VS中使用淘宝npm镜像了.

猜你喜欢

转载自blog.csdn.net/CrackLibby/article/details/81639297