Join GitHub today
To handle those extra requests we must configure Angular CLI to proxy those requests to other servers that can understand and respond appropriately to them. To do this, create a a file proxy.conf.json in the root of your Angular CLI project, alongside the package.json file. Currently when installing behind a proxy to get the chromium downloader to respect the proxy settings you have to set the environment variables for HTTPPROXY and HTTPSPROXY. Npm config get https-proxy npm config get proxy. And then to fall back on the environment variables if needed.
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave 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.
![Npm Config Proxy Npm Config Proxy](/uploads/1/2/6/2/126266032/500249391.png)
Already on GitHub? Sign in to your account
Comments
commented Sep 1, 2017
Currently when installing behind a proxy to get the chromium downloader to respect the proxy settings you have to set the environment variables for HTTP_PROXY and HTTPS_PROXY .For me personally I would expect the proxy settings to be taken from the npm config e.g. And then to fall back on the environment variables if needed. |
commented Sep 1, 2017
@cleavera afaiu configuring global HTTP proxy with HTTP_PROXY env variable is the default approach - what are the scenarios when it doesn't work for you? NPM itself respects them. |
commented Sep 5, 2017 • edited
edited
Hi there, @aslushnikov sorry for the slow reply. When doing an npm install behind the proxy we have always had to specify the config variables directly for npm. This may have changed for npm5 (I'm not entirely sure) but the default behavior would still be npm config, then environment variables. Some members of my team have only had the npm config variables set and they have had no issue downloading other binaries such as phantomjs and node-sass, so I can only assume these libraries respect the npm config variables aswell.For me npm should really be using the environment variables by default without having their own settings but I feel as long as npm respects those internal config variables then they should be all that is needed to complete a successful install. |
commented Sep 5, 2017
@cleavera which OS and terminal program are you guys working with? |
commented Sep 5, 2017
Combination of windows and mac. Powershell, cmd and bash |
referenced this issue Sep 5, 2017
Mergedsupport npm proxy configuration for the installation script #692
added a commit that referenced this issue Sep 9, 2017
commented Sep 9, 2017
Ta |
commented Sep 9, 2017
@cleavera does the fix work for you? (make sure to install puppeteer from github right away) |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment