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
浙公网安备 33010602011771号