npm, yarn配置

一、npm

  1. 查看当前的镜像源。

```

npm config get registry

```

  1. 设置为淘宝源

```

npm config set registry https://registry.npm.taobao.org

```

  1. 还原默认源

```

npm config set registry https://registry.npmjs.org/

二、Yarn

1.yarn的安装

```

npm install -g yarn

```

  1. 查看当前镜像源

```

yarn config get registry

```

  1. 设置为淘宝镜像源

```

yarn config set registry https://registry.npmmirror.com

```

  1. 切回原镜像源

```

yarn config set registry https://registry.yarnpkg.com

相关推荐
lolo大魔王13 分钟前
Go 语言 Web 框架 Gin 入门详解
前端·golang·gin
喵个咪28 分钟前
一套Schema,生成全部代码|Kratos高效开发新范式
前端·后端·架构
Dewyze同学32 分钟前
我用 Cursor 三天从零到可上线:uni-app + Fastify 全栈小程序复盘
前端
qq_3813385036 分钟前
前端虚拟列表与无限滚动性能优化实战:从万级数据到丝滑体验
前端·javascript·html·优化
hexu_blog40 分钟前
前端vue后端springboot如何实现图片格式转换
前端·javascript·vue.js
代码煮茶41 分钟前
Vue3 项目规范实战 | ESLint+Prettier+Git Hooks 搭建前端代码规范体系
前端·javascript·vue.js
米丘41 分钟前
新一代代码格式化工具 Oxfmt/Oxlint
前端·rust·前端工程化
韭菜炒大葱1 小时前
讲讲 浏览器的缓存机制
前端·面试·浏览器
AI砖家1 小时前
DeepSeek TUI 保姆级安装配置全指南 -Windows||macOS双平台全覆盖
服务器·前端·人工智能·windows·macos·ai编程·策略模式
Apache0121 小时前
chrome调试打开,让AI来操作浏览器
前端·chrome