npm,yarn,pnpm配置淘宝镜像
npm
镜像源
npm -------- https://registry.npmjs.org/
yarn ------- https://registry.yarnpkg.com/
cnpm ------- http://r.cnpmjs.org/
taobao ----- https://registry.npm.taobao.org/
nj --------- https://registry.nodejitsu.com/
npmMirror -- https://skimdb.npmjs.com/registry/
edunpm ----- http://registry.enpmjs.org/
查看 npm 的基本配置
npm config list
查看 npm 的所有配置
npm config list -l
查看镜像源
npm config get registry
npm配置淘宝镜像
npm config set registry https://registry.npm.taobao.org
yarn
查看 yarn 的基本配置
yarn config list
查看镜像源
yarn config get registry
yarn配置淘宝镜像
yarn config set registry https://registry.npm.taobao.org
pnpm
查看镜像源
pnpm config get registry
yarn配置淘宝镜像
pnpm config set registry https://registry.npm.taobao.org
其他命令
pnpm install 包
pnpm i 包
pnpm add 包 // -S 默认写入dependencies
pnpm add -D // -D devDependencies
pnpm add -g // 全局安装
pnpm remove 包 //移除包
pnpm remove 包 --global //移除全局包
pnpm up //更新所有依赖项
pnpm upgrade 包 //更新包
pnpm upgrade 包 --global //更新全局包
设置存储路径:pnpm config set store-dir /path/to/.pnpm-store
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构