npm设置华为镜像 作者:马育民 • 2024-02-21 22:51 • 阅读:10013 需要掌握:[npm设置淘宝镜像](https://www.malaoshi.top/show_1IX2LbvJSWcd.html "npm设置淘宝镜像") ### 设置镜像源 ``` npm config set registry https://mirrors.huaweicloud.com/repository/npm/ ``` ### 清空缓存(可略) ``` npm cache clean -f ``` ### 查看是否设置成功 ``` npm config get registry ``` 或 ``` npm config list ``` 参考: https://www.cnblogs.com/lishidefengchen/p/14086733.html 原文出处:http://malaoshi.top/show_1IX7C2WWgf7H.html