When trying to npm i -g --production windows-build-tools, the postinstall script fails with a timeout when trying to download BuildTools_Full.exe (I'm running from an elevated cmd.exe on Windows 10):
C:\WINDOWS\system32>node --version
v6.4.0
C:\WINDOWS\system32>npm i -g --production windows-build-tools
(node:16288) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
> [email protected] postinstall C:\Users\{{my user}}\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./lib/index.js
Downloading BuildTools_Full.exe
Error: connect ETIMEDOUT 104.123.2.47:80
{ Error: connect ETIMEDOUT 104.123.2.47:80
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '104.123.2.47',
port: 80 }
I'm behind a corporate proxy (http://proxy:8080), have npm configured to use it, and npm works successfully with it.
Is windows-build-tools known to work behind proxies? Is there a way (e.g. via environment variables) to tell it the proxy to use? Am I missing something?
:tada: There's proxy support now, thanks for reporting! Use PowerShell to set a PROXY environment variable and let me know if it works - it should, but I don't have the means of actually testing it.
$env:PROXY = "Your Proxy"
You sir are a beast!
Works like a charm. Wish we'd ship fixes in 9 hours as well... great work!
Most helpful comment
:tada: There's proxy support now, thanks for reporting! Use PowerShell to set a
PROXYenvironment variable and let me know if it works - it should, but I don't have the means of actually testing it.