angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

"ng update" doesn't support private repos such as FontAwesome 5 Pro

Open bjornharvold opened this issue 8 years ago • 172 comments

Versions

Angular CLI: 6.0.0
Node: 9.11.1
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

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

Repro steps

  • Add dependency on a private repo such as FontAwesome 5 Pro
  • Run ng update @angular/core

Observed behavior

Not found : @fortawesome/pro-regular-svg-icons

Mention any other details that might be useful (optional)

This works fine using npm directly because the private repo has already been registered with npm

bjornharvold avatar May 04 '18 02:05 bjornharvold

Okay, so I'm not the only one with the problem #10571 It also looks like CLI 6.0.0 doesn't support authentication included in global .npmrc

DaSchTour avatar May 04 '18 07:05 DaSchTour

This should be fixed sooner than later

Ben305 avatar May 04 '18 07:05 Ben305

There is definitely a problem when using a private npm repository. I could only run ng update correctly once I removed my .npmrc file, and removed every private package from package.json. After running ng update @angular/cli' it finally correctly generated the angular.json file and I readded all the references I removed before.

Timebutt avatar May 04 '18 12:05 Timebutt

Can you provide the list of option names used within .npmrc?

clydin avatar May 04 '18 17:05 clydin

I have the same problem, my .npmrc looks like this:

@myprefix:registry=https://npm.ourdomain.local

Ben305 avatar May 04 '18 17:05 Ben305

Sure, this is what my .npmrc looks like:

registry=https://npm.showpad.io:8080
save-exact=true
//npm.showpad.io:8080/:_authToken=${NPM_TOKEN}

Timebutt avatar May 04 '18 17:05 Timebutt

While looking at the growing list of bugs relating .npmrc #10704 #10571 #10660 I think this should be fixed asap

DaSchTour avatar May 08 '18 08:05 DaSchTour

Hi @bjornharvold, @DaSchTour,

Could you verify this is still an issue with 6.0.1? There were a few fixes regarding the registry flag (we have 1 fix in queue for the strict-ssl flag). Thanks!

hansl avatar May 14 '18 21:05 hansl

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


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

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.1
@angular-devkit/build-angular     0.6.1
@angular-devkit/build-optimizer   0.6.1
@angular-devkit/core              0.6.1
@angular-devkit/schematics        0.6.1
@angular/cdk                      6.0.1
@angular/cli                      6.0.1
@angular/material                 6.0.1
@ngtools/webpack                  6.0.1
@schematics/angular               0.6.1
@schematics/update                0.6.1
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Yep still happens with 6.0.1. Targeting VSTS in my .npmrc registry=https://PRIVATE.pkgs.visualstudio.com/_packaging/PRIVATE/npm/registry/

Unexpected token T in JSON at position 0
TF400813: Resource not available for anonymous access. Client authentication required.

rhythmnewt avatar May 14 '18 22:05 rhythmnewt

Angular CLI: 6.0.1
Node: 8.9.0
OS: darwin x64
Angular: 6.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.1
@angular-devkit/build-angular     0.6.1
@angular-devkit/build-optimizer   0.6.1
@angular-devkit/core              0.6.1
@angular-devkit/schematics        0.6.1
@angular/cdk                      5.2.5
@angular/material                 5.2.5
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.1
@schematics/angular               0.6.1
@schematics/update                0.6.1
ng-packagr                        2.4.4
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Still valid for me too using a scoped repository.

ng update @angular/cli
ng update @angular/core

Went smoothly but ng update @angular/material broke with a 401 error.

ThYpHo0n avatar May 15 '18 13:05 ThYpHo0n

Experiencing this issue with @angular/[email protected] and private Nexus repository

Content of .npmrc looks something like...

registry=
email=
always-auth=true
_auth=

abbazabacto avatar May 18 '18 13:05 abbazabacto

Having the same issue using a JFrog Artifactory (universal artifact manager) as registry in .npmrc. This may be related: https://github.com/angular/devkit/issues/917

tilowestermann avatar May 19 '18 09:05 tilowestermann

I'm also having this same problem with @angular/[email protected] and VSTS

ajpierson avatar May 21 '18 18:05 ajpierson

Same problem here behind a private Nexus repo

pouyio avatar May 22 '18 15:05 pouyio

Same here, happens with our own private repo ng update returns Not found: @org/package although npm install @org/package works fine and the package is already installed in node_modules.

7bamboo avatar May 29 '18 16:05 7bamboo

Same problem with 6.0.7 just now.

eitland avatar May 30 '18 06:05 eitland

@hansl any update on this? The issue still carries the "need: more info" label.

tilowestermann avatar May 31 '18 08:05 tilowestermann

I'm also curious, is there anything we can do or provide to speed this issue up?

Timebutt avatar May 31 '18 08:05 Timebutt

I think it is fixed by https://github.com/angular/devkit/pull/982 in https://github.com/angular/devkit/releases/tag/v6.1.0-beta.1 release. Can anybody verify?

devoto13 avatar May 31 '18 09:05 devoto13

I'd be happy to test it, but I'm not quite sure how to...I'm a little confused how devkit relates to CLI. What do I install to test this, is there an NPM package? Do I clone the repo and do an NPM link? If I install that package does the CLI use it, or does it supersede the CLI. Sorry, I'm a little ignorant, I'd love a little guidance.

Or do I just wait for an updated @angular/cli v6.1.0-beta.1 to be released?

ajpierson avatar May 31 '18 20:05 ajpierson