"ng update" doesn't support private repos such as FontAwesome 5 Pro
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
@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.
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.
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
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)
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
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.
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)
delete node_modules and run ng upgrade @angular/core
rm -rf node_modules
ng update @angular/core
it works for me
@aghou That does provide a usable workaround, but the time spent removing and re-installing is not good.
Still hoping for a fix.
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=
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
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!
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
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".
The above works for me too.
@blueiceprj solution might work for one off private repos, but not when your corp caches/replicates npm on jFrog Artifactory.
@ankemp Right! We are also blocked to perform the update to ^6.1.0
Having same issue
+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 👎
Same here with @angular/cli 6.2.1
registry=https://ourNexus/repository/npm/
//ourNexus/repository/npm/:_authToken=000000_DUMMY_00000000