当前位置:网站首页>npm、nrm两种方式查看源和切换镜像
npm、nrm两种方式查看源和切换镜像
2022-08-02 05:18:00 【m0_67393413】
一、使用npm查看当前源、切换淘宝镜像、切换官方源
(1)npm查看当前源:
npm get registry
(2)npm设置淘宝镜像源:
npm config set registry http://registry.npm.taobao.org
(3)npm设置官方源:
npm config set registry http://www.npmjs.org
二、使用nrm查看和切换镜像
1、首先通过npm安装nrm:
npm install -g nrm
2、通过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/
3、如果想要使用某一个,直接use,比如我要使用淘宝镜像的源:
nrm use taobao
出现下面提示就说明切换成功了!

4、如果出现下面的爆红情况:可能是没有全局安装nrm,npm install -g nrm。全局安装记得加-g
如有问题,欢迎指正!!!
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
猜你喜欢

字节面试题:如何保证缓存和数据库的一致性

The advantages of making web3d dynamic product display

Install and use Google Chrome

软件测试的需求人才越来越多,为什么大家还是不太愿意走软件测试的道路?

程序员写PPT的小技巧

制作web3d动态产品展示的优点

Different ways of shell scripting

关于鸿蒙系统 JS UI 框架源码的分析

There are more and more talents in software testing. Why are people still reluctant to take the road of software testing?

路由规划中级篇
随机推荐
线程基础(一)
Important concepts of target detection - IOU, receptive field, hole convolution, mAP
秒杀系统小demo
Guarantee WIFI security in home and enterprise-with AC and AP networking experiment
触发器简单解释
What are the ways to improve software testing capabilities?After reading this article, it will take you up a notch
在腾讯做外包测试的那些日子.....
Contents of encoding-indexes.js file printed with Bluetooth:
关于web应用的目录结构
人工神经网络
跨桌面端Web容器演进
非关系型数据库MongoDB的特点及安装
驱动页面性能优化的3个有效策略
Brush LeetCode topic series - 10. Regular expression match
leetcode-338.比特位计数
如何进行并发数计算(稳定性测试和压力测试)?
自动化运维工具——ansible、概述、安装、模块介绍
pytorch常用函数
家用 NAS 服务器(4)| MergerFS和SnapRaid数据定时备份
OAuth 授权协议 | 都云原生时代了,我们应该多懂一点OAuth ?