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

@hansl & @filipesilva This thread still has the "need more info" and "low frequency" labels. Based on the thread's activity, I assume that both are not valid anymore and possibly give a false impression of the severity of this issue.

tilowestermann avatar Jul 30 '18 08:07 tilowestermann

Why is this need more info and low frequency @hansl? It affects nearly every corporate developer because we all have private npm packages. Not to mention anyone who has spent the time to decouple their application into components.

bytenik avatar Aug 05 '18 15:08 bytenik

I'm also seeing this issue on various 6.0.0+ versions. Tried some of the solutions above and none of them worked for me.

Any timeline on a fix?

Update:

Got it to work by removing the private registry from the .npmrc file and following the usual migration steps. But we shouldn't have to resort to this kind of a hack. Is someone going to change the attributes for this issue? Definitely shouldn't be labeled as low frequency

grantcp avatar Aug 06 '18 15:08 grantcp

still the same issue with @schematics/[email protected] and @angular/[email protected]

Angular CLI: 6.1.2
Node: 8.11.3
OS: darwin x64
Angular: 6.0.7
... common, compiler, compiler-cli, core, forms, http
... platform-browser, platform-browser-dynamic

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.0.29
@angular-devkit/schematics        0.0.52
@angular/animations               6.0.9
@angular/cli                      6.1.2
@angular/router                   6.0.9
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.8
@schematics/angular               0.7.2
@schematics/update                0.7.2
rxjs                              6.2.1
typescript                        2.7.2
webpack                           4.8.3
ng update @angular/cli
401 Unauthorized

Workaround that works for me:

  • temporary removing all private dependencies from package.json (no need to uninstall / reinstall them)
  • and ensure there's no private default registry in .npmrc (usually I got the private mirror with public and private packages there)

e-hein avatar Aug 09 '18 12:08 e-hein

Still failing with 6.1.3:

Angular CLI: 6.1.3
Node: 10.8.0
OS: linux x64
Angular: 6.1.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.3
@angular-devkit/build-angular     0.7.3
@angular-devkit/build-optimizer   0.7.3
@angular-devkit/build-webpack     0.7.3
@angular-devkit/core              0.7.3
@angular-devkit/schematics        0.7.3
@angular/cli                      6.1.3
@ngtools/webpack                  6.1.3
@schematics/angular               0.7.3
@schematics/update                0.7.3
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.9.2
$ ng update
401 Unauthorized

ghost avatar Aug 13 '18 15:08 ghost

Already page one of the most commented open issues. Hopefully we will get some attentation when this hits the 400 comments mark and reach the top of most commented issues. So come on people, we can do this.

DaSchTour avatar Aug 14 '18 06:08 DaSchTour

Facing this error too:

Angular CLI: 6.1.3
Node: 8.11.3
OS: win32 x64
Angular: 6.1.2
... animations, common, compiler, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.7.3 (cli-only)
@angular-devkit/core         0.7.3 (cli-only)
@angular-devkit/schematics   0.7.3 (cli-only)
@angular/cdk                 6.4.3
@angular/cli                 <error>
@angular/compiler-cli        <error>
@angular/flex-layout         6.0.0-beta.17
@schematics/angular          0.7.3 (cli-only)
@schematics/update           0.7.3 (cli-only)
rxjs                         6.2.2
typescript                   2.9.2 (cli-only)

deniskrafczyk avatar Aug 14 '18 09:08 deniskrafczyk

delete node_modules and run ng upgrade @angular/core

rm -rf node_modules
ng update @angular/core

it works for me

aghou avatar Aug 15 '18 12:08 aghou

@aghou That does provide a usable workaround, but the time spent removing and re-installing is not good.

Still hoping for a fix.

ghost avatar Aug 15 '18 12:08 ghost

I have the same problem with 6.1.3 and JFrog Artifactory. A fix would be most appreciated.

.npmrc is like: registry= email= always-auth=true _auth=

Konni1337 avatar Aug 15 '18 13:08 Konni1337

It's not just an issue with private repos, I get the same error with a public repo url that uses the "git+https://URL#HASH" pattern, e.g. :

https://github.com/danhooper/ngQuickDate.git#e313316be410887d7289f355fc55ad4f4fecec15

$ ng update
Not found : ngQuickDate

jziggas avatar Aug 16 '18 14:08 jziggas

Confirmation that @angular/cli 6.0.0+ has broken authentication to private npm registries:

$ ng update <package_on_private_registry>
Unable to authenticate, need: Basic realm="Artifactory Realm"

I have tested edge version @angular/[email protected], and same issue. This is a serious bug that will prevent our organisation from upgrading to angular 6.

Please fix asap!

mrmaxsteel avatar Aug 17 '18 14:08 mrmaxsteel

Same here. We have a private repo in VSTS and I cannot update @angular/core because of that bug. I vote for fixing it asap

akisiel1 avatar Aug 23 '18 14:08 akisiel1

Hi,

Globally set these values so it works in any project:

npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
npm config set "//npm.fontawesome.com/:_authToken" XXXXXXX-XXXXXXXX-XXXXX

Its worked for me "ng update".

blueiceprj avatar Aug 27 '18 20:08 blueiceprj

The above works for me too.

dottodot avatar Aug 28 '18 08:08 dottodot

@blueiceprj solution might work for one off private repos, but not when your corp caches/replicates npm on jFrog Artifactory.

ankemp avatar Aug 28 '18 17:08 ankemp

@ankemp Right! We are also blocked to perform the update to ^6.1.0

ghost avatar Aug 29 '18 12:08 ghost

Having same issue

williamzhao87 avatar Aug 31 '18 15:08 williamzhao87

+1 this really needs a resolution. Due to this issue we have missed our window to upgrade and have to wait till next release cycle in several months time 👎

beanian avatar Sep 11 '18 10:09 beanian

Same here with @angular/cli 6.2.1

registry=https://ourNexus/repository/npm/
//ourNexus/repository/npm/:_authToken=000000_DUMMY_00000000

lefevre00 avatar Sep 11 '18 11:09 lefevre00