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
相关推荐
li357412 小时前
将已有 Vue 项目通过 Electron 打包为桌面客户端的完整步骤
前端·vue.js·electron
Icoolkj13 小时前
VuePress 与 VitePress 深度对比:特性、差异与选型指南
前端·javascript·vue.js
excel13 小时前
CNN 分层详解:卷积、池化到全连接的作用与原理
前端
excel13 小时前
CNN 多层设计详解:从边缘到高级特征的逐层学习
前端
西陵14 小时前
Nx带来极致的前端开发体验——任务编排
前端·javascript·架构
大前端helloworld14 小时前
从初中级如何迈入中高级-其实技术只是“入门卷”
前端·面试
Cosmoshhhyyy15 小时前
Node.js 18+安装及Claude国内镜像使用、idea中claude插件下载指南
node.js
东风西巷16 小时前
Balabolka:免费高效的文字转语音软件
前端·人工智能·学习·语音识别·软件需求
萌萌哒草头将军16 小时前
10个 ES2025 新特性速览!🚀🚀🚀
前端·javascript·vue.js