当前位置:网站首页>nrm详解
nrm详解
2022-06-29 22:26:00 【小李科技】
1,什么是nrm
nrm 是一个 npm 源管理器,允许你快速地在 npm源间切换。
什么意思呢,npm默认情况下是使用npm官方源(使用npm config ls命令可以查看),在国内用这个源肯定是不靠谱的,一般我们都会用淘宝npm源:https://registry.npm.taobao.org/,修改源的方式也很简单,在终端输入:
npm set registry https://registry.npm.taobao.org/
再npm config ls查看,已经切换成功。
那么,问题来了,如果哪天你又跑去国外了,淘宝源肯定是用不了的,又要切换回官网源,或者哪天你们公司有自己的私有npm源了,又需要切换成公司的源,这样岂不很麻烦?于是有了nrm。
2,nrm安装
npm install -g nrm
3,nrm使用
3.1查看可选源 星号代表当前使用源
nrm ls
3,nrm使用
3.1查看可选源 星号代表当前使用源
nrm ls

**3.1查看当前源
nrm current

3.2 切换源
nrm use <registry>
其中,registry为源名。
比如:切换为taobao源
nrm use taobao

4,添加源
nrm add <registry> <url>
其中,registry为源名,url为源地址。
比如:添加一个公司私有的npm源,源地址为:
$ http://192.168.22.11:8888/repository/npm-public/,源名为cpm(随意取)。
$ nrm add cpm http://192.168.22.11:8888/repository/npm-public/

然后,查看是否添加成功

5,删除源
nrm del <registry>
其中,registry为源名。
比如:删除刚才添加的cpm源
nrm del cpm
6,测试源速度
nrm test
其中,registry为源名。
比如:测试官方源和淘宝源的响应时间
nrm test npm
nrm test taobao

边栏推荐
- Does rapid software delivery really need to be at the cost of security?
- Is it safe to open an account on the flush? Where to apply for opening an account
- 短视频平台搭建,淡入淡出 支持左滑右滑轮播图
- Gnawing down the big bone - sorting (I)
- AI scene Storage Optimization: yunzhisheng supercomputing platform storage practice based on juicefs
- 新手必须知道的 Kubernetes 架构
- 深入解析kubernetes中的选举机制
- Unicom warehousing | all Unicom companies that need to sell their products need to enter the general warehouse first
- Portable 4K audio and video conference terminal all-in-one machine with 8x digital zoom
- 这个flink cdc可以用在做oracle到mysql的,增量同步吗
猜你喜欢

math_ Basic elementary function graph (power function / exponent / logarithm / trigonometry / inverse trigonometry)

Kubernetes architecture that novices must know
![[multithreading] how to implement timer by yourself](/img/a9/dd9489c7a0028dd9d3a6dae9a71deb.png)
[multithreading] how to implement timer by yourself

深入解析kubernetes controller-runtime

Arrange the array into the smallest number_ Reverse pairs in an array (merge Statistics)_ Number of occurrences of a number in an ascending array_ Ugly number (Sword finger offer)

读书郎上市背后隐忧:业绩下滑明显,市场地位较靠后,竞争力存疑

Qt5.14.2 error connecting to the MySQL database of Ubuntu 20.04

触摸按键与按键控制对应的LED状态翻转

One click file sharing software jirafeau

Detailed description of gaussdb (DWS) complex and diverse resource load management methods
随机推荐
Huawei's software testing director with 7 years' experience, several suggestions for all students who want to switch to software testing
Build a short video platform, fade in and fade out, and support left sliding and right pulley to broadcast pictures
Qt5.14.2 error connecting to the MySQL database of Ubuntu 20.04
Detailed description of gaussdb (DWS) complex and diverse resource load management methods
5-1 system vulnerability scanning
2022 (第五届)GIS软件技术大会开幕,GIS、IT将加速融合
Day9 - user registration and login
Steady! The best posture for thousands of microservices to access Zadig (helm chart)
C language tutorial – -6 loop statement
Grep工具
Code sharing for making and developing small programs on the dating platform
IFLYTEK AI learning machine summer new product launch AI + education depth combination to create a new height of products
26 years old, 0 basic career change software test, from 3K to 16K monthly salary, a super complete learning guide compiled by me
每日刷题记录 (八)
软件快速交付真的需要以安全为代价吗?
Low code, end-to-end, one hour to build IOT sample scenarios, and the sound network released lingfalcon Internet of things cloud platform
科大讯飞 AI 学习机暑期新品发布会 AI + 教育深度结合再创产品新高度
读书郎上市背后隐忧:业绩下滑明显,市场地位较靠后,竞争力存疑
联通入库|需要各地联通公司销售其产品的都需要先入总库
从零实现深度学习框架——LSTM从理论到实战【理论】