shama/nodewebkit

Getting "connect ETIMEDOUT" on scripts/install.js behind a corporate proxy

aradisich opened this issue · 3 comments

I have to run npm through CNTLM to get around a corporate proxy/firewall (see http://stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy), but it seems like this proxy setting is not being used by the nodewebkit installer, and it results in a "connect ETIMEDOUT" error during the postinstall step, specifically on:

node scripts/install.js

I was able to get it to work by modifying .\node_modules\nodewebkit\scripts\install.js to pass a proxy setting to the download module:

...
var d = download(url, dest, { extract: true, strip: 1, proxy: 'http://127.0.0.1:3128' });
...

Not sure if it's possible, but it would be great to pass in the npm proxy setting to this script if it's been set.

I have the same problem. Configure proxy or using proxy parameters from npm would be nice.

Ah, I found the solution. You have to set the environment variable http_proxy with http://username:password@myproxy.de:8080

@SSilence Nice! Would you mind sending a PR updating the readme with that solution?