mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-23 10:41:31 +08:00
1.1 KiB
1.1 KiB
title, date, author, tags, published, slug, description, category, toAstro
title | date | author | tags | published | slug | description | category | toAstro | ||
---|---|---|---|---|---|---|---|---|---|---|
npm换源 | 2024-02-07 | KazooTTT |
|
true | npm-registry | 本文介绍了如何查看、更换和取消Node.js包管理工具(npm, yarn, pnpm)的源地址,以及如何使用yrm工具快速切换不同的npm源。通过执行特定的命令,用户可以轻松地管理这些工具的源设置,从而优化包的下载速度和开发效率。 | 前端 | true |
查看源
npm config get registry
yarn config get registry
pnpm config get registry
换源
npm config set registry https://registry.npmmirror.com
yarn config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com
取消换源
npm config delete registry
yarn config delete registry
pnpm config delete registry
工具
npm install -g yrm
yrm ls
yrm use [name]