Trying to build installer for my package but it fails with the following exception:
Unhandled rejection Error: connect ETIMEDOUT 108.168.243.150:443
at Object.exports._errnoException (util.js:1008:11)
at exports._exceptionWithHostPort (util.js:1031:20)
at TCPConnectWrap.afterConnect as oncomplete
From previous event:
at C:\git\adt_tools\electron\playground\node_modules\electron-builder\src\util\binDownload.ts:52:17
at next (native)
at C:\git\adt_tools\electron\playground\node_modules\fs-extra-p\node_modules\fs-extra\lib\mkdirs\mkdirs.js:35:14
at FSReqWrap.oncomplete (fs.js:123:15)
From previous event:
at tsAwaiter (C:\git\adt_tools\electron\playground\node_modules\electron-builder\src\util\awaiter.ts:10:47)
at Object.build (C:\git\adt_tools\electron\playground\node_modules\electron-builder\src\builder.ts:192:52)
at Object.(C:\git\adt_tools\electron\playground\node_modules\electron-builder\src\build-cli.ts:27:28)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3
Problem appears both with NSIS and Squirrel target.
I'm behind a corporate proxy, so I suspect it's somehow related to this, although I defined proxy settings (both http & https) for npm.
UPD:
That is a proxy issue for sure - just tried it with no proxy and it works.
Perhaps you're connecting to some server from within electron-builder code (not via npm) and then you probably should provide an option to configure proxy for electron-builder?
https://bintray.com is used to download pre-bundled dependencies (e.g. nsis). npm configured proxy should be used, yes.
I've encountered the same issue. Due to the direct usage of nodes 'https' module, http proxies wont work. See httpRequest.ts
I'm working on a PR, using either nugget or request for downloading the binaries, just like electron-download does.
@marttinen It is better to not use nugget or request, but fix httpRequest.ts I think it is not a lot of work here.
Does anyone know which npm packages can be downloaded manually to bypass this error?
@ajklotz Unpack Archive.zip to ~/.cache
Standard env HTTP_PROXY / HTTPS_PROXY is supported. NPM conf will be added later.
Most helpful comment
@ajklotz Unpack Archive.zip to
~/.cache