docs: correct the install and upgrade commands for 21.0.0-rc.1 - #3765
armando-navarro wants to merge 2 commits into
Conversation
`ng update @angular/core @angular/cli` now moves an app to Angular 22, which AngularFire 21 does not support, and `ng update @angular/fire` resolves to 20.1.0. One command naming the versions replaces both. The quickstart had the same problem from the other side, creating the project on the newest Angular and then installing from `latest`. The per-product pages now point at the quickstart instead of each repeating `ng add @angular/fire`. Setup stops with `Cannot read properties of undefined (reading 'email')` on firebase-tools 15, so the docs say to install version 14.
tyler-reitz
left a comment
There was a problem hiding this comment.
Requesting changes on one point; the rest is non-blocking.
The firebase-tools guidance contradicts itself, and a clean machine still breaks. Three install commands are unpinned and resolve to 15.30.2 today, the version this PR says fails:
docs/install-and-setup.md:5tells readersng addinstalls the CLI for them, so they do not have to act first. Butsrc/schematics/firebaseTools.ts:30runsnpm i --location=global firebase-toolsunpinned, so on a machine with no CLI,ng addinstalls 15 itself and hits the crash every time. The bullet's own remedy,npm install -g firebase-tools, also lands on 15.docs/install-firebase-tools.md: the new banner says install 14, and every command below it installs latest.
Pinning @14 in those commands and reversing the first bullet closes it.
Non-blocking:
docs/compat.md:4carries the same headline command that was updated in the README.site/src/get-started/quick-start.md:21still has the bare command and is the/get-startedredirect target. Pre-existing, so fine to leave, but it is the last page with this defect.- #3764 says the firebase-tools 15 crash gets its own issue. I do not see one open. The unguarded reads are
setup/prompts.ts:110(defaultUser.email) andsetup/index.ts:95(user.email, whereuserPromptcan returnlogin()'sundefined).
I did not run ng add against firebase-tools 15; that part is read from the call sites. The unpinned install and latest = 15.30.2 I checked.
|
Narrowing my review: I am dropping the One thing left before I approve. Could you also file the firebase-tools 15 issue #3764 promised? Nothing is open for it yet. |
The Firebase CLI bullet said `ng add` installs the CLI for you, so you do not have to act first. The auto-install names no version, so a machine with no CLI gets firebase-tools 15 and setup then stops with `Cannot read properties of undefined (reading 'email')` (angular#3768). Refs angular#3764
|
@tyler-reitz Thanks for the review. Both asks are implemented:
Leaving |
Fixes #3764
The Quickstart and the v21 upgrade guide documented commands that cannot produce a working app now that
21.0.0-rc.1is onnextand Angular 22 is onlatest.What changed
ng update @angular/core@21 @angular/cli@21 @angular/fire@next.@angular/fire@next.@nexton the newest Angular major is gone, since the release candidate does not support Angular 22.ng add @angular/fire.ng addstops withCannot read properties of undefined (reading 'email').Verification
Run against a real app:
getVertexAIcall the upgrade guide's command:@angular/fire^21.0.0-rc.1, which npm currently resolves to the canary21.0.0-rc.1-canary.95b3de1(tracked separately, see Canary builds are named after the release candidate, so npm ranks them above it #3766)firebase ^12.18.0getAI(..., { backend: new AgentPlatformBackend() })@angular/core ^21.2.0app:npm create @angular@21yarn create @angular@21ng newfrom@angular/cli@21ng add @angular/fire@nextwas run in a fresh Angular 21 app, selecting an existing Firebase project and web app.provideFirebaseAppandprovideAuthintoapp.config.ts, and the app built.login()directly returnsundefinedon 15.28.1 and an object carryingemailon 14.27.0.