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
posted @   iooz  阅读(3290)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示