当前位置:首页 » 《随便一记》 » 正文

npm 镜像地址

0 人参与  2024年09月27日 12:00  分类 : 《随便一记》  评论

点击全文阅读


        嗨,我是小路。今天主要和大家分享的主题是“npm 镜像地址”。        

这篇文章主要介绍npm国内镜像地址,切换不同的镜像地址,保证网络正常,下载对应的依赖。

淘宝

1. npm config set registry https://registry.npmmirror.co

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

 阿里云

2. npm config set registry https://npm.aliyun.co

npm config set registry https://npm.aliyun.com

 腾讯云

3. npm config set registry http://mirrors.cloud.tencent.com/npm

npm config set registry http://mirrors.cloud.tencent.com/npm/

 华为云

4. npm config set registry https://mirrors.huaweicloud.com/repository/npm

npm config set registry https://mirrors.huaweicloud.com/repository/npm/

二、实例代码

1、查看/设置镜像

//设置npm config set registry xxxx npm config set registry https://registry.npmjs.org/ //查看npm config get registry xxxxnpm config get registry https://registry.npmjs.org/ 

三、注意事项

       如果镜像源网络不通,可以切换不同的镜像尝试。

都看到这里了,记得【点赞】+【关注】哟。


点击全文阅读


本文链接:http://zhangshiyu.com/post/165289.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1