Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binwrap fails to install behind a corporate firewall (seems to ignore proxy settings) #47

Closed
trs123 opened this issue Aug 28, 2020 · 3 comments

Comments

@trs123
Copy link

trs123 commented Aug 28, 2020

Hi, when trying to install elmi-to-json (for elm-spa) from behind a corporate firewall I get the following binwrap-install error:

$ npm i elmi-to-json
> [email protected] install /home/trs/test-elm-spa/ri-elm/node_modules/elmi-to-json
> binwrap-install
ERR Error communicating with URL https://github.com/stoeffel/elmi-to-json/releases/download/1.3.0/elmi-to-json-1.3.0-linux.tar.gz Error: tunneling socket could not be established, statusCode=407
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `binwrap-install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

This only happens for binwrap-install. Other packages not using it can be installed without problems, so it is not a problem with my proxy settings. It seems that binwrap-install does not honor the proxy settings.

@trs123
Copy link
Author

trs123 commented Aug 28, 2020

This might be related to #19 (comment)

@avh4
Copy link
Owner

avh4 commented Aug 28, 2020

[email protected] uses [email protected], which uses the npm request package for HTTP. So you should be able to set environment variables as described here: https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables

For example:

HTTPS_PROXY="https://USERNAME:[email protected]:8080/" npm i elmi-to-json

Does something like that work?

@trs123
Copy link
Author

trs123 commented Sep 2, 2020

The environment variables https_proxy and http_proxy had been set already but it seems that our VPN has changed (not sure if that is just an intermediate state or if it will stay that way), so I do not need to set them anymore and installing now works fine.
I am quite confused now because I'm not sure when that happened and so cannot reproduce the original error anymore.
Sorry about that. I'll close the issue for now and will reopen it if/when I encounter it again.

@trs123 trs123 closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants