yarn 切换国内源

创建日期: 2022-10-26 20:45 | 作者: 风波 | 浏览次数: 12 | 分类: 前端

参考:http://wxnacy.com/2020/09/26/yarn-use-custom-registry/

~~yarn config set registry https://registry.npm.taobao.org/~~

或者下面的配置:

~~yarn config set registry https://registry.npm.taobao.org --global~~ ~~yarn config set disturl https://npm.taobao.org/dist --global~~

参考:https://www.jianshu.com/p/44024bd2c05e


2024-11-25

来源: - https://blog.csdn.net/ichen820/article/details/135747004 - https://juejin.cn/post/7397723783442333696 - https://blog.csdn.net/weixin_45046532/article/details/139681731

淘宝 npm 域名已停止解析

新的yarn源域名

    // 查询源
    yarn config get registry

    // 更换国内源
    yarn config set registry https://registry.npmmirror.com

    // 恢复官方源
    yarn config set registry https://registry.yarnpkg.com

    // 删除注册表
    yarn config delete registry

npm 源配置

// 查询源
npm config get registry

// 更换国内源
npm config set registry https://registry.npmmirror.com

// 恢复官方源
npm config set registry https://registry.npmjs.org

// 删除注册表
npm config delete registry

腾讯源:https://mirrors.cloud.tencent.com/npm/

推荐使用 npm config set registry https://r.cnpmjs.org/

12 浏览
0 评论