我正在安全的封闭网络下工作,我的 Electron 构建器依赖项无法更新/下载它们的依赖项,因此我需要在 github 代理后面工作才能下载它们, 但我不知道在哪里设置它,
13:30:09][Step 12/15] > electron-builder --win --x64
[13:30:09][Step 12/15]
[13:30:10][Step 12/15] • electron-builder version=20.8.1
[13:30:10][Step 12/15] • artifacts will be published if draft release exists reason=CI detected
[13:30:11][Step 12/15] • loaded configuration file=D:\BuildAgent\work\4247f9413726d058\electron-builder.json
[13:30:11][Step 12/15] • description is missed in the package.json appPackageFile=D:\BuildAgent\work\4247f9413726d058\package.json
[13:30:11][Step 12/15] • author is missed in the package.json appPackageFile=D:\BuildAgent\work\4247f9413726d058\package.json
[13:30:20][Step 12/15] • no native production dependencies
[13:30:21][Step 12/15] • packaging platform=win32 arch=x64 electron=1.8.4 appOutDir=app-builds\win-unpacked
[13:30:55][Step 12/15] • downloading path=D:\BuildAgent\temp\buildTmp\electron-builder-cache\winCodeSign\winCodeSign-2.0.0 url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.0.0/winCodeSign-2.0.0.7z
[13:30:55][Step 12/15] ⨯ Get https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.0.0/winCodeSign-2.0.0.7z: proxyconnect tcp: tls: oversized record received with length 20527
最佳答案
您提到您的构建在代理后面运行,因此请尝试在代理地址中使用 http 而不是 https:
导出 HTTPS_PROXY="http://myproxy.com:8080"
而不是
导出 HTTPS_PROXY="https://myproxy.com:8080"
从这里开始:
关于node.js - 如何为 Electron-builder 配置设置 github 代理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50622859/