npm 最新国内镜像源设置 2025

1. 国内源

淘宝:https://registry.npmmirror.com/
腾讯云:https://mirrors.cloud.tencent.com/npm/
CNPM:https://r.cnpmjs.org/

2.设置

#查询当前使用的镜像源
npm get registry

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

#验证设置
npm get registry

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

posted @ 2024-12-13 20:14  工程师焱记  阅读(43346)  评论(0)    收藏  举报