安装 nrm 自由切换 npm 源 国内镜像提升下载速度
2023-09-27 14:28:00 时间
/Users/zhangzhi/code nrm -h Usage: nrm [options] [command] Commands: ls list all the registries current show current registry name use registry change registry to registry add registry url [home] add one custom registry del|rm registry delete one custom registry home registry [browser] open the homepage of registry with optional browser test [registry] show response time for specific or all registries help print this help Options: -h, --help output usage information -V, --version output the version number
查看当前支持切换的源
/Users/zhangzhi/code nrm ls npm ---- https://registry.npmjs.org/ cnpm --- http://r.cnpmjs.org/ * taobao - http://registry.npm.taobao.org/ edunpm - http://registry.enpmjs.org/ eu ----- http://registry.npmjs.eu/ au ----- http://registry.npmjs.org.au/ sl ----- http://npm.strongloop.com/ nj ----- https://registry.nodejitsu.com/ pt ----- http://registry.npmjs.pt/
上面列出了可选的 9个源,还用 * 号标记出了当前我使用的源
假如现在我想把 taobao 源 切换成 eu 的镜像源( 貌似走的教育网,我也不确定速度是不是快,只是演示切换)
/Users/zhangzhi/code nrm use eu Registry has been set to: http://registry.npmjs.eu/
切换后的源列表
/Users/zhangzhi/code nrm ls npm ---- https://registry.npmjs.org/ cnpm --- http://r.cnpmjs.org/ taobao - http://registry.npm.taobao.org/ edunpm - http://registry.enpmjs.org/ * eu ----- http://registry.npmjs.eu/ au ----- http://registry.npmjs.org.au/ sl ----- http://npm.strongloop.com/ nj ----- https://registry.nodejitsu.com/ pt ----- http://registry.npmjs.pt/
可以看到源已经切换成了 eu
你还可以添加已知的源,或者删除
相关文章
- Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1
- Windows10 下安装scrapy 日志
- Jetty安装配置
- Tomcat在Linux上的安装与配置
- CVE 2019 0708 安装重启之后 可能造成 手动IP地址丢失.
- Centos6.9安装Node.js+npm爬坑
- php imagick扩展安装
- Centos7上安装docker
- CentOS安装node和npm
- npm学习(四)之如何安装全局包、更新全局安装的包、卸载全局安装的包
- npm学习(三)之如何安装本地包、更新本地安装的包、卸载本地安装的包
- nrm 安装与npm镜像切换
- RabbitMQ的安装
- npm 在全局都安装过哪些包
- 【Google Play】APK 扩展包 ( 2021年09月02日最新处理方案 | 内部测试链接 | 安装 Google Play 中带 扩展文件 的 APK 安装包 | 验证下载的扩展文件 )
- ubuntu docker 安装 mysql
- PowerShell 通过 WMI 获取系统安装的驱动
- linux 编译安装TRMPdump(libRTMP)