Skip to content

ng update ignores proxy config #13166

@daniel-seitz

Description

@daniel-seitz

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 (#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions