Skip to content

Commit 1c8f0f3

Browse files
docs: correct the install and upgrade commands for 21.0.0-rc.1 (#3765)
The upgrade guide and quickstart gave commands that fail with rc.1 on `next` and Angular 22 on `latest`. The guide now uses one command naming Angular 21 and `@next`. The quickstart creates the project on Angular 21, installs `@next`, and says to install firebase-tools 14 first (#3768). Both follow with `npm install --save-exact @angular/fire@next` to install the release candidate rather than a canary release (#3766). The product pages now point at the quickstart.
1 parent 95b3de1 commit 1c8f0f3

16 files changed

Lines changed: 45 additions & 62 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ AngularFire smooths over the rough edges an Angular developer might encounter wh
55
[Firebase JS SDK](https://github.com/firebase/firebase-js-sdk) & aims to provide a more natural developer experience
66
by conforming to Angular conventions.
77

8-
<strong><pre>ng add @angular/fire</pre></strong>
8+
<strong><pre>ng add @angular/fire@next</pre></strong>
99

1010
- **Dependency injection** - Provide and Inject Firebase services in your components.
1111
- **Zone.js wrappers** - Stable zones allow proper functionality of service workers, forms, SSR, and pre-rendering.

‎docs/ai.md‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ Firebase AI Logic gives you access to the latest generative AI models from Googl
88

99
[Learn more](https://firebase.google.com/docs/ai-logic)
1010

11-
> Firebase AI Logic was previously called **Vertex AI in Firebase**. If you are upgrading from AngularFire 20, the module moved from `@angular/fire/vertexai` to `@angular/fire/ai` and most symbols were renamed (`provideVertexAI` to `provideAI`, `VertexAI` to `AI`). One is not a rename: plain `getAI()` uses the Gemini Developer API backend, so the old `getVertexAI()` maps to `getAI(app, { backend: new AgentPlatformBackend() })`. Running `ng update @angular/fire` rewrites all of this for you and keeps your app on the same backend, though a call that passed no `location` moves from `us-central1` to `global`. See the [AngularFire 20 to 21 upgrade guide](./version-21-upgrade.md).
11+
> Firebase AI Logic was previously called **Vertex AI in Firebase**. If you are upgrading from AngularFire 20, the module moved from `@angular/fire/vertexai` to `@angular/fire/ai` and most symbols were renamed (`provideVertexAI` to `provideAI`, `VertexAI` to `AI`). One is not a rename: plain `getAI()` uses the Gemini Developer API backend, so the old `getVertexAI()` maps to `getAI(app, { backend: new AgentPlatformBackend() })`. Running the `ng update` command in the [AngularFire 20 to 21 upgrade guide](./version-21-upgrade.md) rewrites all of this for you and keeps your app on the same backend, though a call that passed no `location` moves from `us-central1` to `global`.
1212
1313
## Dependency Injection
1414

15-
As a prerequisite, ensure that `AngularFire` has been added to your project via
16-
```bash
17-
ng add @angular/fire
18-
```
15+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1916

2017
Provide an AI instance in the application's `app.config.ts`:
2118

‎docs/analytics.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ Google Analytics is an app measurement solution, available at no charge, that pr
1212

1313
## Dependency Injection
1414

15-
As a prerequisite, ensure that `AngularFire` has been added to your project via
16-
```bash
17-
ng add @angular/fire
18-
```
15+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1916

2017
Provide an Analytics instance in the application's `app.config.ts`:
2118

‎docs/app-check.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ App Check helps protect your API resources from abuse by preventing unauthorized
1212

1313
## Dependency Injection
1414

15-
As a prerequisite, ensure that `AngularFire` has been added to your project via
16-
```bash
17-
ng add @angular/fire
18-
```
15+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1916

2017
Provide an App Check instance in the application's `app.config.ts`:
2118

‎docs/auth.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ Firebase Authentication integrates tightly with other Firebase services, and it
1515

1616
## Dependency Injection
1717

18-
As a prerequisite, ensure that `AngularFire` has been added to your project via
19-
```bash
20-
ng add @angular/fire
21-
```
18+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
2219

2320
Provide an Auth instance in the application's `app.config.ts`:
2421

‎docs/data-connect.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ Firebase Data Connect (now known as "Firebase SQL Connect" in the Firebase docum
1010

1111
## Dependency Injection
1212

13-
As a prerequisite, ensure that `AngularFire` has been added to your project via
14-
```bash
15-
ng add @angular/fire
16-
```
13+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1714

1815
Provide a Data Connect instance in the application's `app.config.ts`. `getDataConnect` takes a connector config that identifies your service, connector, and location; this is generated for you when you set up Data Connect and is also exported from your generated SDK:
1916

‎docs/database.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSO
1212

1313
## Dependency Injection
1414

15-
As a prerequisite, ensure that `AngularFire` has been added to your project via
16-
```bash
17-
ng add @angular/fire
18-
```
15+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1916

2017
Provide a Database instance in the application's `app.config.ts`:
2118

‎docs/firestore.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ Cloud Firestore is the API that gives your application access to your database i
1414

1515
## Dependency Injection
1616

17-
As a prerequisite, ensure that `AngularFire` has been added to your project via
18-
```bash
19-
ng add @angular/fire
20-
```
17+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
2118
Provide a Firestore instance in the application's `app.config.ts`:
2219

2320
```ts

‎docs/functions.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ The Cloud Functions for Firebase client SDKs let you call functions directly fro
1212

1313
## Dependency Injection
1414

15-
As a prerequisite, ensure that `AngularFire` has been added to your project via
16-
```bash
17-
ng add @angular/fire
18-
```
15+
As a prerequisite, ensure that `AngularFire` has been added to your project as described in the [Quickstart](./install-and-setup.md).
1916

2017
Provide a Cloud Functions instance in the application's `app.config.ts`:
2118

‎docs/install-and-setup.md‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,56 @@
22

33
## Before you begin
44

5-
- **Firebase CLI.** Setup uses the Firebase CLI (`firebase-tools`), version 14 or newer. `ng add` installs it if it is missing and prompts you to sign in, so you do not have to install it yourself first. It does not upgrade a copy you already have, so an older one stops setup with `firebase-tools version 14.0.0+ is required, please upgrade and run again`. To handle it ahead of time, or to clear that error, run `npm install -g firebase-tools` then `firebase login`.
6-
- **On the newest Angular major, use `@next`.** If `ng add @angular/fire` reports an Angular peer-dependency conflict, your Angular version is newer than AngularFire's default (`latest`) release. Install the version-matched pre-release instead: `ng add @angular/fire@next`.
5+
- **Firebase CLI**
6+
- Setup uses the Firebase CLI (`firebase-tools`). Install version 14 first, with `npm install -g firebase-tools@14`, then `firebase login`.
7+
- With no CLI on the machine, `ng add` installs the newest version for you, and on version 15 setup stops right after the features question with `Cannot read properties of undefined (reading 'email')` (#3768).
8+
- A copy older than 14 stops setup with `firebase-tools version 14.0.0+ is required, please upgrade and run again`, and `ng add` does not upgrade a copy you already have.
79
- **Harmless CLI noise.** The Firebase CLI may print a `punycode` deprecation warning or ask about enabling extra features (for example Gemini) during setup. These come from the CLI, not from AngularFire, and are safe to ignore.
810

911
### 1. Create a new project
1012

1113
```bash
1214
# Using yarn create
13-
yarn create @angular <project-name>
15+
yarn create @angular@21 <project-name>
1416
cd <project-name>
1517
```
1618
or
1719

1820
```bash
1921
# Using npm create
20-
npm create @angular <project-name>
22+
npm create @angular@21 <project-name>
2123
cd <project-name>
2224
```
2325

2426
optionally installing the tooling directly:
2527
```bash
2628
# Installing the tooling directly
27-
npm install -g @angular/cli
29+
npm install -g @angular/cli@21
2830
ng new <project-name>
2931
cd <project-name>
3032
```
3133

32-
The Angular CLI's `new` command will set up the latest Angular build in a new project structure.
34+
These commands set up an Angular 21 project, the version AngularFire 21 supports.
3335

3436
### 2. Install AngularFire and Firebase
3537

38+
AngularFire 21 is currently a release candidate, published under the `next` tag:
39+
3640
```bash
37-
ng add @angular/fire
41+
ng add @angular/fire@next
3842
```
3943

4044
This installs AngularFire and configures your project. `ng add` will:
4145

4246
1. Prompt you to select the features to enable and the Firebase project to use, signing you in to Firebase if needed.
4347
2. Add `provideFirebaseApp(...)`, along with a provider for each feature you select, to your app configuration (for example `app.config.ts`), with your Firebase configuration inlined. No environment files are created.
4448

49+
`ng add` writes the version it installed into your `package.json`, and today that is a canary release such as `21.0.0-rc.1-canary.95b3de1` rather than the release candidate. To replace it with the release candidate, `21.0.0-rc.1`, run:
50+
51+
```bash
52+
npm install --save-exact @angular/fire@next
53+
```
54+
4555
### 3. Inject `Firestore`
4656

4757
Open `/src/app/app.ts` and make the following changes:

0 commit comments

Comments
 (0)