npm 淘宝||华为-镜像的安装(2023最新版)

568 阅读1分钟

原淘宝npm域名即将停止解析官方链接,以下命令已更新,放心使用 。

1.常见的NPM仓库:

①npm官方仓库(美国): https://registry.npmjs.com/

②淘宝镜像仓库(国内):https://registry.npmmirror.com/

③华为镜像仓库(国内):https://mirrors.huaweicloud.com/registry/npm/

2.win+r

image-20221207110343180.png

3.查看当前系统中默认的NPM仓库地址:

npm  config  get  registry

image-20221207105846434.png

4.修改当前系统中默认的NPM仓库地址:

npm  config  set  registry 新的仓库地址

例如: npm config set registry https://registry.npmmirror.com/

image-20221207105904046.png