切换NPM源(淘宝源)

前言

meteor从1.3版本开始支持直接使用npm,对于开发者来说是个福音。但是npm的连接地址建议换成淘宝npm镜像的地址,原因只有一个,那就是下载速度快

默认的npm下载地址:http://www.npmjs.org/
淘宝npm镜像的地址:https://npm.taobao.org/

临时使用淘宝源

npm --registry https://registry.npm.taobao.org install node-red-contrib-composer@latest

全局配置切换到淘宝源

 npm config set registry https://registry.npm.taobao.org

全局配置切换到官方源

 npm config set registry http://www.npmjs.org

检测是否切换到了淘宝源

npm info underscore
.......

gitHead: 'e4743ab712b8ab42ad4ccb48b155034d02394e4d',
  dist: 
   { shasum: '4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022',
     size: 34172,
     noattachment: false,
    // 有 registry.npm.taobao.org 等字样  说明切换成功
     tarball: 'http://registry.npm.taobao.org/underscore/download/underscore-1.8.3.tgz' },
  directories: {},
  publish_time: 1427988774520 }
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值