Hi FE !
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
  • 切换npm 镜像源

切换npm 镜像源

-- 查看当前地址:
npm config get registry
https://registry.npmjs.org/
 
npm config get disturl
undefined
 
 
-- 设置当前地址(设置为淘宝镜像)
npm config set registry http://registry.npmmirror.com/
 
-- 设置当前地址(设置为默认地址)
npm config set registry https://registry.npmjs.org/
 
-- 每次执行命令前加入–registry指定仓库路径
npm --registry https://registry.npmmirror.com/ install
 
# 使用nrm工具切换淘宝源
npx nrm use taobao
 
# 如果之后需要切换回官方源可使用
npx nrm use npm

淘宝镜像每15分钟更新一次

https://registry.npmmirror.com

Edit this page
最近更新: 2025/6/27 02:24
Contributors: qdleader
qdleader
本站总访问量 129823次 | 本站访客数 12人