Node.js / npm / yarn / pnpmstable
淘宝 npm 镜像(npmmirror)
https://registry.npmmirror.com由阿里巴巴维护的官方 npm 镜像,与官方同步,最推荐
npmyarnpnpmNode.js
使用说明
淘宝 npm 镜像(npmmirror)
npm:
npm config set registry https://registry.npmmirror.com
npm config get registry # 验证
yarn:
yarn config set registry https://registry.npmmirror.com
pnpm:
pnpm config set registry https://registry.npmmirror.com
临时使用(不修改全局配置):
npm install --registry=https://registry.npmmirror.com
恢复官方源:
npm config set registry https://registry.npmjs.org
⚠️ 注意:原
registry.npm.taobao.org已停用,请统一换用registry.npmmirror.com。
