ng update ignores proxy config
See original GitHub issueBug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
issue was partially discussed here (https://github.com/angular/angular-cli/issues/10624) after .npmrc issues and later (original issue solved) determined that there is a different issue.
- we use yarn with a private repo behind a corporate proxy.
- local .npmrc:
registry=[some url, masked out] always-auth=true - yarn lock contains packages where I see some as resolved with [some url, masked out]
also there are packages with
https://registry.yarnpkg.com/some-package-and-so-on - global .yarnrc (in C:\Users\MyUserName):
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
lastUpdateCheck 1543945019859
- global .npmrc (in C:\Users\MyUserName):
//some_path_with_some_token
proxy= http://our_proxy_with_port/
https-proxy= http://our_proxy_with_port
- trying to follow commands from update.angular.io
yarn installworks, everything else from 6. works but notng update @angular/cli, message comes up after a while (1 minute or so):request to https://registry.npmjs.org/@types%2fjasmine failed, reason: connect ETIMEDOUTseems to be on a random package, at another try I got:request to https://registry.npmjs.org/codelyzer failed, reason: connect ETIMEDOUT [some ip address and port]
Assumption:
It seems that ng update @angular/cli ignores the proxy since it should go to the configured proxy or https-proxy instead of npmjs.org.
Should the command be ng update @angular/cli@next? (Results in same error message) P.S. I tried migrate only - which works - and then update the packages via yarn, also works. I just think that I might miss something that ng update does as well, other than migrating to the angular.json file and lifting the packages to the recent version.
- currently still running angular 5.1.1
- tried as described with @next option in
yarn global add @angular/cli@nextandyarn add @angular/cli@next - ng --version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 7.2.0-beta.1
Node: 8.12.0
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.12.0-beta.1
@angular-devkit/core 7.2.0-beta.1
@angular-devkit/schematics 7.2.0-beta.1
@angular/cli 7.2.0-beta.1
@angular/language-service 4.4.6
@schematics/angular 7.2.0-beta.1
@schematics/update 0.12.0-beta.1
rxjs 5.5.3
typescript 2.4.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:19 (7 by maintainers)
Top Results From Across the Web
angular ng update not working - timeout where proxy is saved?
the project was at E:\Users\d00lar\Desktop, "npm config list" retuns that ... You have to remove the proxy configuration in the .npmrc file.
Read more >Mastering Angular proxy configuration | by JM Robles - Medium
We use the following proxy. conf as base template. With this simple configuration, any request which its URL starts with “/api”, it's reversed...
Read more >Building and serving Angular apps
If you edit the proxy configuration file, you must relaunch the ng serve process to make your changes effective. Rewrite the URL pathlink....
Read more >Angular proxy to backend is not working - Morioh
Another way to configure proxy config in the Angular project is defining in angular.json. proxyConfig in angular.json. Let's summarize the ways here. Add...
Read more >Modify Response Headers in Angular Proxy (ng serve)
Use 'bypass' to modify request and response headers in the Angular Proxy. ... Now, after you run ng server --proxy-config src/proxy.config.js requests to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ahasall Worked for me, also behind corporate proxy with our own registry
Try
ng update --registry=<your_internal_registry>.