npm、pnpm、yarn使用淘宝镜像

文章目录

npm

shell 复制代码
# 查询当前使用的镜像源
npm get registry

# 设置为淘宝镜像源
npm config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
npm config set registry https://registry.npmjs.org/

pnpm

安装方法

Windows

powershell 复制代码
iwr https://get.pnpm.io/install.ps1 -useb | iex

其它

shell 复制代码
curl -fsSL https://get.pnpm.io/install.sh | sh -

Or

shell 复制代码
wget -qO- https://get.pnpm.io/install.sh | sh -

Or

shell 复制代码
npm install -g pnpm

设置镜像

shell 复制代码
# 查询当前使用的镜像源
pnpm get registry

# 设置为淘宝镜像源
pnpm config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
pnpm config set registry https://registry.npmjs.org/

yarn

shell 复制代码
# 查询当前使用的镜像源
yarn config get registry

# 设置为淘宝镜像源
yarn config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
yarn config set registry https://registry.yarnpkg.com/
相关推荐
徐先生 @_@|||14 小时前
大数据处理框架(Hadoop VS PySpark)
大数据·hadoop·分布式·spark·k8s·yarn
摇滚侠1 天前
Node.js 零基础教程,Node.js 和 NPM 的安装与使用
前端·npm·node.js
查士丁尼·绵2 天前
hadoop集群存算分离
hive·hdfs·zookeeper·spark·hbase·yarn·galera
ghgxm5202 天前
Fastapi_00_学习策略与学习计划
python·学习·前端框架·npm·fastapi
ggaofeng5 天前
实践NPM打包和使用
前端·npm·node.js
ggaofeng5 天前
理解npm的原理
前端·npm·node.js
鹿衔`6 天前
CDH 6.3.2 异构集群优化实施文档
hdfs·yarn·cdh·cdh集群优化
中年程序员一枚7 天前
nuxt安装出现certificate 错误
前端框架·npm·node.js
十月不到底7 天前
Windows 上安装 Volta
windows·npm
橙序员小站7 天前
解密前端包管理工具:npm、Yarn与pnpm的全面对比
前端·npm·node.js