yarn、npm设置淘宝国内镜像

NPM

1. 查询当前镜像

复制代码
npm get registry 

2. 设置为淘宝镜像

复制代码
npm config set registry https://registry.npm.taobao.org/        (旧地址,不再维护,可以使用)
npm config set registry https://registry.npmmirror.com/         (最新地址)

3. 设置为官方镜像

复制代码
npm config set registry https://registry.npmjs.org/

YARN(同理)

1. 查询当前镜像

复制代码
yarn config get registry

2. 设置为淘宝镜像

复制代码
yarn config set registry https://registry.npm.taobao.org/        (旧地址)
yarn config set registry https://registry.npmmirror.com/         (最新地址)

3. 设置为官方镜像

复制代码
yarn config set registry https://registry.yarnpkg.com
相关推荐
半点寒12W1 小时前
微信小程序实现路由拦截的方法
前端
某公司摸鱼前端2 小时前
uniapp socket 封装 (可拿去直接用)
前端·javascript·websocket·uni-app
要加油哦~2 小时前
vue | 插件 | 移动文件的插件 —— move-file-cli 插件 的安装与使用
前端·javascript·vue.js
小林学习编程2 小时前
Springboot + vue + uni-app小程序web端全套家具商场
前端·vue.js·spring boot
柳鲲鹏2 小时前
WINDOWS最快布署WEB服务器:apache2
服务器·前端·windows
GDAL3 小时前
Node.js v22.5+ 官方 SQLite 模块全解析:从入门到实战
数据库·sqlite·node.js
weixin-a153003083163 小时前
【playwright篇】教程(十七)[html元素知识]
java·前端·html
ai小鬼头4 小时前
AIStarter最新版怎么卸载AI项目?一键删除操作指南(附路径设置技巧)
前端·后端·github
一只叫煤球的猫4 小时前
普通程序员,从开发到管理岗,为什么我越升职越痛苦?
前端·后端·全栈
vvilkim4 小时前
Electron 自动更新机制详解:实现无缝应用升级
前端·javascript·electron