当前位置:网站首页>npm---npm配置文件
npm---npm配置文件
2022-04-21 13:39:00 【monstkl】
一、npm运行时配置文件.npmrc
作用:设置package.json中的依赖包的安装来源
二、配置方式
// 以key=value的形式
// 普通包来源
registry=https://registry.npmmirror.com
// 设置范围包的来源,以@test开头的包从xxx那里下载
@test:registry=xxx
三、各个地方的npm配置文件的优先级
1、项目配置文件
获取:在项目的根目录下有个.npmrc文件
设置:在项目的根目录下新建.npmrc文件
2、用户配置文件
获取:npm config get userconfig
设置:npm config set registry xxx
3、全局配置文件
获取:npm config get prefix
设置:npm config set registry xxx -g
4、npm内置配置文件
获取:which npm
设置:不推荐设置
版权声明
本文为[monstkl]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_43390711/article/details/124308218
边栏推荐
- nmap使用
- Peking University ACM problems 1009: edge detection
- Feedforward neural network
- 前馈神经网络
- Mysql 驱动为什么要依赖 protobuf
- Do self media and short videos, and don't trust those mutual relations and mutual praise
- Réaliser l'affichage aléatoire de l'étiquette, de la taille de la police et de la couleur
- 北京大学ACM Problems 1008:Maya Calendar
- What is federal learning?
- What is the Intel quartus prime, the introduction to digital IC tools? What's the difference between the three versions
猜你喜欢
随机推荐
Huffman coding
单体测试使用Assert.assertThat(expected,Matcher matcher)来对比结果和预期
Can great talents be of little use? Oceanbase integration scenario test
Wang Baiping: my way to envoy maintainer
no server suitable for synchronization found
Code Huffman
CV technical guide free knowledge planet
Ali Tianchi competition -- street view character coding recognition
List stores map values
Wanzi dry goods! Help you master the knowledge of "light and shadow" in design
[C] give the earth some light
Read fast RCNN
Route selection, anti ring and re release of hcip OSPF
In office word 2016, omml2mml appears when the formula edited by word's own formula editor is transferred to MathType Solutions to XSL problems
上周国外互联网产品新闻简编 - Angel
Do self media and short videos, and don't trust those mutual relations and mutual praise
AI video cloud vs narrowband HD, who is the darling of the video era
[digital signal processing] correlation function (energy signal | cross correlation function of energy signal | autocorrelation function of energy signal)
Open mmlab / mmpose installation and use tutorial
The difference between thread library and ASIO Library








