2022年05月31起老的淘宝镜像将无法使用需要换源
![](http://ywhblog.top/wp-content/uploads/2024/01/19020fa3d1853a8dc9a4892a9d0595e.png)
查看镜像使用状态
npm config get registry
若返回 “https://registry.npm.taobao.org/“,说明配置的是淘宝镜像;
如果返回 “https://registry.npmjs.org/“,说明配置的是官方镜像。
切换前先清除缓存
npm cache clean --force
清除后,如果你有代理的话可以不需要设置镜像源
设置新的镜像
npm config set registry https://registry.npmmirror.com