Skip to content

Commit f4c8604

Browse files
docs: show how to install the release candidate instead of a canary
With `@next`, `ng add` and `ng update` currently install a canary release (#3766). The quickstart and upgrade guide now follow each with `npm install --save-exact @angular/fire@next`.
1 parent 7294c17 commit f4c8604

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎docs/install-and-setup.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ This installs AngularFire and configures your project. `ng add` will:
4646
1. Prompt you to select the features to enable and the Firebase project to use, signing you in to Firebase if needed.
4747
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.
4848

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+
4955
### 3. Inject `Firestore`
5056

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

‎docs/version-21-upgrade.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The release candidate is published under the `next` tag. From an app on Angular
1010
ng update @angular/core@21 @angular/cli@21 @angular/fire@next
1111
```
1212

13+
`ng update` writes the range `^21.0.0-rc.1` into your `package.json`. That range also matches canary releases, and npm currently installs one of them, such as `21.0.0-rc.1-canary.95b3de1`, instead of the release candidate. To install the release candidate itself, and stop npm from picking a canary release on a later install, change the entry to the exact version `21.0.0-rc.1` by running:
14+
15+
```bash
16+
npm install --save-exact @angular/fire@next
17+
```
18+
1319
The AngularFire update runs a migration that:
1420

1521
- **Aligns your `firebase` dependency to `^12.18.0`.** AngularFire 21 requires Firebase JS SDK 12, at 12.18 or later. If your app requested an older `firebase`, whether that is 11 or an earlier 12, npm would install both that copy and the one AngularFire needs side by side, and the two copies reject each other's objects at runtime. The migration updates the dependency and reinstalls so you end up with a single copy. Verify with `npm ls firebase`.

0 commit comments

Comments
 (0)