设置npm源的几种方式
设置npm源的几种方式
原始源
# the original source
https://registry.npmjs.org/
方案: 使用nrm
- 安装
 
npm install -g nrm
- 列出源的候选项
 
nrm ls
输出结果:
* npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/
- 使用淘宝源
 
nrm use taobao
方案: 改变全局的注册
- 设置成淘宝源
 
npm config set registry https://registry.npm.taobao.org
- 查看结果
 
npm config get registry
输出结果:
https://registry.npm.taobao.org/
- 测试一下
 
npm info underscore
方案: 在命令行里指定源
npm --registry https://registry.npm.taobao.org install [name]
方案: 修改 ~/.npmrc
registry = https://registry.npm.taobao.org
方案: 使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install [name]
参照
设置npm源的几种方式的更多相关文章
- HTML中设置背景图的两种方式
		
HTML中设置背景图的两种方式 1.background background:url(images/search.png) no-repeat top; 2.background-image ...
 - keras embeding设置初始值的两种方式
		
随机初始化Embedding from keras.models import Sequential from keras.layers import Embedding import numpy a ...
 - Latex中如何设置字体颜色(3种方式)
		
Latex中如何设置字体颜色(三种方式) 1.直接使用定义好的颜色 \usepackage{color} \textcolor{red/blue/green/black/white/cyan/ma ...
 - 设置session超时的三种方式
		
设置session超时的三种方式 1. 在容器中设置:如在tomcat-7\conf\web.xml中设置 Tomcat默认session超时时间为30分钟,可以根据需要修改,负数或0为不限制sess ...
 - 切换npm源的几种方法
		
我们在使用官方提供的npm源安装各种依赖包的时候,下载速度会很慢,通常需要更换npm源. 我们可以在终端中输入命令 npm config list 来查看 npm 源地址,默认地址为 metrics- ...
 - Linux中设置服务自启动的三种方式
		
有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务 主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc*.d目录中建立/e ...
 - [转]Linux中设置服务自启动的三种方式
		
from:http://www.cnblogs.com/nerxious/archive/2013/01/18/2866548.html 有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统 ...
 - Linux中设置服务自启动的三种方式,ln -s 建立启动软连接
		
有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务(http://www.0830120.com) 主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc*.d目录中建立 ...
 - (转)Linux中设置服务自启动的三种方式
		
有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务 主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc*.d目录中建立/e ...
 
随机推荐
- 91云服务器网络带宽测试,IO测试、全国ping测试
			
91yun服务器测试一键包介绍 一键包主要是为了让大家快速对服务器的基本状况有一个了解.考虑到天朝的网络出口问题,所以这个一键包更加偏向网络的测试. 影响测试耗时主要是下载,整个测试如果是能跑满100 ...
 - opencv:图像模糊
			
高斯模糊 #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespa ...
 - HDU-1702-ACboy needs your help again!(Stack)
			
队列和栈的判空都可以用empty #include <bits/stdc++.h> using namespace std; string oper,stru; int T,M,num; ...
 - C语言程序设计(一)
			
目录: 1. 向屏幕输出一行文字 2. 输出两个函数的和 3. 函数一 4. 函数二 5. 求两个数的最大值 6. printf和scanf函数的返回值 7. 输入一个成绩,输出所对应的 ...
 - Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) - D2. Optimal Subsequences (Hard Version)(主席树)
			
题意:一共有$n$个数,$m$次询问,每次询问包括$k.pos$两个数,需要你从这$n$个数里面找出$k$个数,使得他们的总和最大,如果有多种情况,找出序号字典序最小的一组,然后输出这个序列中第$po ...
 - Codeforces Round #597 (Div. 2)D(最小生成树)
			
/*每个点自己建立一座发电站相当于向超级源点连一条长度为c[i]的边,连电线即为(k[i]+k[j])*两点间曼哈顿距离,跑最小生成树(prim适用于稠密图,kruscal适用于稀疏图)*/ #def ...
 - mysql DATE_FORMAT 函数使用
			
使用DATE_FORMAT 查询数据库中时间类型显示 SELECT a.name ,a.uuid ,p.assess_price as assessPrice ,p.assess_date as as ...
 - php引入html页面 css报错 404
			
php引入html页面 css报错 404, html页面内 有css, 有一样 是这么写的 结果就报错了, 原来是 -moz这一句,在这句前面随便加一句别的样式就可以....
 - UIDocumentPickerViewController和UIDocumentInteractionController
			
UIDocumentPickerViewController和UIDocumentInteractionController UIDocumentPickerViewController 补充一下,U ...
 - 关于浮动&关于BFC规范&whyoverflow清除浮动
			
https://www.cnblogs.com/smivico/p/7656270.html 浮动 https://www.jianshu.com/p/4b93eecb090e BFC https:/ ...