Skip to content

error 401 unauthorized with custom .npmrc during ng update #10704

@jwoehrle

Description

@jwoehrle

Versions

λ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.0
Node: 9.8.0
OS: win32 x64
Angular: 6.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0


λ npm --version
5.6.0

λ node --version
v9.8.0

Repro steps

  • use a project on @angular/cli 1.7.4 with a custom .npmrc containing credentials for connecting to custom npm registry
  • follow update steps described at https://update.angular.io/

Observed behavior

running the step ng update @angular/cli results in an error message 401 unauthorized.

Removing the custom .npmrc along with internal dependencies from package.json and running ng update @angular/cli succeeds

Desired behavior

ng update @angular/cli works without removing the custom .npmrc or at least prints a more useful error message

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions