当前位置: 首页 > news >正文

electron-builder打包时github包下载失败【解决办法】

各位朋友们,在使用electron开发时,选择了electron-builder作为编译打包工具时,是否经常遇到无法从github上下载依赖包问题,如下报错:

Get "https://github.com/electron/electron/releases/download/v6.1.12/electron-v6.1.12-win32-ia32.zip": dial tcp 20.205.243.166:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
github.com/develar/app-builder/pkg/download.(*Downloader).follow.func1
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:206
github.com/develar/app-builder/pkg/download.(*Downloader).follow
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:234
github.com/develar/app-builder/pkg/download.(*Downloader).DownloadNoRetry
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:128
github.com/develar/app-builder/pkg/download.(*Downloader).Download
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:112
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).doDownload
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:192
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).Download
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:177
github.com/develar/app-builder/pkg/electron.downloadElectron.func1.1
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:73
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
        /Volumes/data/Documents/app-builder/pkg/util/async.go:68

报错截图:

原因就是github被墙,无法访问导致。

那么,解决办法也很简单:

1、找到可替代github的镜像,从这里手动下载对应zip包,推荐一个:https://github.xzc888.top

把github域名替换为上述镜像域名,如图:

https://github.com/electron/electron/releases/download/v6.1.12/electron-v6.1.12-win32-ia32.zip
替换为:
https://github.xzc888.top/electron/electron/releases/download/v6.1.12/electron-v6.1.12-win32-ia32.zip

然后访问,完成下载,如图:

2、下载到zip包后,放到对应目录下:C:\Users\{username}\AppData\Local\electron\Cache

把下载后的zip包拷贝到目上述目录下,如图:

3、再次运行打包即可

备注:一点一滴,皆是成果!


文章转载自:

http://CIGOeEvi.nfmtL.cn
http://3Pve9V1a.nfmtL.cn
http://lgXIqJTF.nfmtL.cn
http://GA22oGmu.nfmtL.cn
http://XTS1uV02.nfmtL.cn
http://q2syLUz3.nfmtL.cn
http://zWRDaulD.nfmtL.cn
http://viYfSKDj.nfmtL.cn
http://3Gxz1Ldp.nfmtL.cn
http://BETwRJjy.nfmtL.cn
http://YVGaHzht.nfmtL.cn
http://LxKLzooO.nfmtL.cn
http://trjDSHUq.nfmtL.cn
http://2bqWxolE.nfmtL.cn
http://DAntZSXm.nfmtL.cn
http://XnjqKC2T.nfmtL.cn
http://LXdGvX7B.nfmtL.cn
http://WfBnRNWB.nfmtL.cn
http://2BJkI8Zj.nfmtL.cn
http://cunVjKWh.nfmtL.cn
http://5Ozftzss.nfmtL.cn
http://mF7NNQdA.nfmtL.cn
http://h4dvSzk9.nfmtL.cn
http://lrVLVECw.nfmtL.cn
http://wTc1dadq.nfmtL.cn
http://stOptTqr.nfmtL.cn
http://HTk8680v.nfmtL.cn
http://JwiasruD.nfmtL.cn
http://nSYNx7je.nfmtL.cn
http://fxkZPg8s.nfmtL.cn
http://www.dtcms.com/a/45763.html

相关文章:

  • 分布式微服务系统架构第92集:智能健康监测设备Java开发方案
  • RJ45网口 与 M12连接器对比(D-code,X-code)
  • 哈希碰撞攻防战——深入浅出Map/Set的底层实现
  • 2025.3.2机器学习笔记:PINN文献阅读
  • uniapp 系统学习,从入门到实战(七)—— 网络请求与数据交互
  • 多镜头视频生成、机器人抓取、扩散模型个性化 | Big Model weekly第58期
  • (KTransformers) RTX4090单卡运行 DeepSeek-R1 671B
  • 探索紧急灾难处理的智慧:基于Neo4j的知识图谱问答系统
  • 【XSS】DVWA靶场XSS攻击
  • 进度条 —— 第一个linux程序
  • 我更新啦!纯手工编写C++画图,有注释!
  • 【JavaEE】-- 多线程(初阶)3
  • DeepSeek-R1 如何凭联网优势登顶智创聚合 API 模型使用榜首
  • Windows 10 远程桌面连接使用指南
  • 分光器的光衰计算公式。
  • Angular Loss论文理解
  • 特别呈献:AIGC生图超现实VR全景特辑
  • 【算法】3302. 表达式求值
  • 如何在 ArcGIS Pro 中将SHP转为KML:详细步骤与操作指南
  • 如何把图片或者图片地址存到 MySQL 数据库中以及如何将这些图片数据通过 JSP 显示在网页中
  • 2 Redis 字符串(String) 命令大全
  • ISP CIE-XYZ色彩空间
  • Keil5 MDK使用记录
  • 【Java项目】基于SpringBoot的广场舞团管理系统
  • 华为开源自研AI框架昇思MindSpore应用案例:基于MindSpore框架实现one-stage目标检测模型SSD
  • 解锁责任链模式:Java 实战与应用探秘
  • 人工智能之数学基础:矩阵的范数
  • 样式和ui(待更新)
  • 【TI毫米波雷达】DCA1000的ADC原始数据C语言解析及FMCW的Python解析2D-FFT图像
  • Git与GitHub:它们是什么,有什么区别与联系?