Skip to content

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

New issue

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

Already on GitHub? Sign in to your account

Closed
jwoehrle opened this issue May 7, 2018 · 5 comments
Closed

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

jwoehrle opened this issue May 7, 2018 · 5 comments

Comments

@jwoehrle
Copy link

jwoehrle commented May 7, 2018

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

@trojanc
Copy link

trojanc commented May 7, 2018

I have same issue, using yarn though...

@DaSchTour
Copy link

Similar to #10571 and #10624 and #10660
.npmrc isn't used correctly

@Bjeaurn
Copy link

Bjeaurn commented May 8, 2018

ng update --registry <http://your.registry> does work, but had some trouble with https in here.

Seems like the .npmrc is not taken into consideration here when running npm commands.

@hansl
Copy link
Contributor

hansl commented May 8, 2018

Dupe of #10624

@hansl hansl closed this as completed May 8, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants