question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng update ignores proxy config

See original GitHub issue

Bug 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.

  1. we use yarn with a private repo behind a corporate proxy.
  2. local .npmrc: registry=[some url, masked out] always-auth=true
  3. 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
  4. global .yarnrc (in C:\Users\MyUserName):
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
lastUpdateCheck 1543945019859
  1. global .npmrc (in C:\Users\MyUserName):
//some_path_with_some_token
proxy= http://our_proxy_with_port/
https-proxy= http://our_proxy_with_port
  1. trying to follow commands from update.angular.io
  2. yarn install works, everything else from 6. works but not ng update @angular/cli, message comes up after a while (1 minute or so): request to https://registry.npmjs.org/@types%2fjasmine failed, reason: connect ETIMEDOUT seems 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.

  1. currently still running angular 5.1.1
  2. tried as described with @next option in yarn global add @angular/cli@next and yarn add @angular/cli@next
  3. 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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ndraimancommented, Jan 13, 2019

Try ng update --registry=<your_internal_registry>.

@ahasall Worked for me, also behind corporate proxy with our own registry

1reaction
ahasallcommented, Dec 19, 2018

Try ng update --registry=<your_internal_registry>.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found