网站产品 模块,营销型网站平台,有情怀的网站设计,深度优化各位朋友们#xff0c;在使用electron开发时#xff0c;选择了electron-builder作为编译打包工具时#xff0c;是否经常遇到无法从github上下载依赖包问题#xff0c;如下报错#xff1a;
Get https://github.com/electron/electron/releases/download/v6.1.12/ele…各位朋友们在使用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、再次运行打包即可 备注一点一滴皆是成果