网站首页 > 技术文章 正文
npm 如何管理和切换镜像
方法一:
查看当前镜像源
> # npm get registry
https://registry.npmjs.org/
切换为淘宝镜像
> # npm config set registry https://registry.npm.taobao.org
切换回原镜像
> # npm config set registry https://registry.npmjs.org
使用 npmmirror 镜像
> # npm config set registry https://registry.npmmirror.com
> # npm config list
......
registry = "https://registry.npmmirror.com/"
......
或者
> # npm install -g cnpm --registry=https://registry.npmmirror.com
注意: 原淘宝 npm 域名即将停止解析(https://registry.npm.taobao.org), 启用新的镜像(https://registry.npmmirror.com)
参考资料:
https://npmmirror.com/
方法二:
安装nrm管理工具
> # npm install -g nrm
> # nrm ls
npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ https://mirrors.cloud.tencent.com/npm/
cnpm --------- https://r.cnpmjs.org/
taobao ------- https://registry.npmmirror.com/
npmMirror ---- https://skimdb.npmjs.com/registry/
> # nrm use taobao
> # npm config list
......
registry = "https://registry.npmmirror.com/"
......
猜你喜欢
- 2024-12-30 go-admin开源项目,快速搭建一个管理后台系统,直接二次开发上线
- 2024-12-30 Ollama教程:本地LLM管理、WebUI对话、Python/Java客户端API应用
- 2024-12-30 Go 项目推荐之 go-admin go的项目
- 2024-12-30 nodejs多版本管理工具 nodejs 版本
- 2024-12-30 npm提示 sill idealTree buildDeps(安装element-ui组件库)
- 2024-12-30 CentOS+Nexus搭建npm私有仓库并推送代码
- 2024-12-30 内网npm私有仓库搭建以及使用教程
- 2024-12-30 TS,TypeScript,Windows环境下构建环境,安装、编译且运行
- 2024-12-30 如何提高npm 下载依赖过慢的问题 npm下载包
- 2024-12-30 使用 Verdaccio 搭建npm私有仓库 搭建自己的npm
- 05-16在实际操作过程中如何避免出现SQL注入漏洞
- 05-16MySQL中 in数量限制
- 05-16一文讲懂SQL筛选子句HAVING子句
- 05-16性能调优实战:Spring Boot 多线程处理SQL IN语句大量值的优化方案
- 05-16sqlserver数据库中的模糊查询like和通配符的使用
- 05-16SQL必备 和 表关联
- 05-16SQL Server优化50法
- 05-16他们一直都在!最新强军大片来了
- 最近发表
- 标签列表
-
- cmd/c (64)
- c++中::是什么意思 (83)
- 标签用于 (65)
- 主键只能有一个吗 (66)
- c#console.writeline不显示 (75)
- pythoncase语句 (81)
- es6includes (73)
- sqlset (64)
- windowsscripthost (67)
- apt-getinstall-y (86)
- node_modules怎么生成 (76)
- chromepost (65)
- c++int转char (75)
- localstorage.removeitem (74)
- vector线程安全吗 (70)
- & (66)
- java (73)
- org.redisson (64)
- js数组插入 (83)
- gormwherein (64)
- linux删除一个文件夹 (65)
- mac安装java (72)
- eacces (67)
- 查看mysql是否启动 (70)
- 无效的列索引 (74)