angularfire
angularfire copied to clipboard
Cannot update @angular/fire from v7 to next version
Version info
Angular: 16.2.12
Firebase:
AngularFire: 7.6.1
Other (e.g. Ionic/Cordova, Node, browser, operating system):
OS: MacOS Sonoma 14.0
How to reproduce these conditions
I am trying to update my angular version from 16.x up to 17. One of the prerequirements is to update @angular/fire up to v17.
ng update
Using package manager: yarn
Collecting installed dependencies...
Found 29 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
--------------------------------------------------------------------------------
@angular/cli 16.1.8 -> 16.2.10 ng update @angular/cli
@angular/core 16.2.8 -> 16.2.12 ng update @angular/core
@angular/fire 7.6.1 -> 16.0.0 ng update @angular/fire
Debug output
I have tried to use ng update @angular/fire
but getting this error
This one is expected, because there are versions between 7 and 17. However when I tried to install next version (16) it gives me same error. I also tried to update it to v8, but it seems that v8 do not exist according to https://www.npmjs.com/package/@angular/fire?activeTab=versions and also based on this issue.
Expected behavior
Update @angular/fire to next version (v16)
Actual behavior
yarn think that next version is 8 but there is no such version
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I just had the same issue. Can't confirm but I believe the issue is because v7.6.1 and v16.0.0 are virtually the same version, so this would not be a real update. Anyway, as a workaround you can just change the version manually in package.json and run npm install.
I just had the same issue. Can't confirm but I believe the issue is because v7.6.1 and v16.0.0 are virtually the same version, so this would not be a real update. Anyway, as a workaround you can just change the version manually in package.json and run npm install.
I think issue is that for some reason npm (yarn) think that next version after 7 is 8 (simple increment). However next version is 16 and when I try to update @angular/fire to version 8 new error appears telling that there no such version, which is true.
Workaround works for me, thanx!
Hi, i have same problem too.
If i try "ng update @angular/fire" I have this error:
Hi, i have same problem too. If i try "ng update @angular/fire" I have this error:
I have tried the workaround mentioned above and it works, so you can try same.
Hi, I am having the below issue... when I am using Ionic 7, "@angular/cli": "^17.0.0", "@angular/fire": "^17.0.1", and "firebase": "10.7.2".
Please help to resolve this issue.
Error: node_modules/@angular/fire/compat/database/interfaces.d.ts:47:18 - error TS2430: Interface 'DatabaseSnapshotExists<T>' incorrectly extends interface 'DataSnapshot'. [ng] Types of property 'forEach' are incompatible. [ng] Type '(action: (a: DatabaseSnapshot<T>) => boolean) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'. [ng] Types of parameters 'action' and 'action' are incompatible. [ng] Types of parameters 'a' and 'a' are incompatible. [ng] Type 'DatabaseSnapshot<T>' is not assignable to type 'IteratedDataSnapshot'. [ng] Type 'DatabaseSnapshotExists<T>' is not assignable to type 'IteratedDataSnapshot'. [ng] Types of property 'key' are incompatible. [ng] Type 'string | null' is not assignable to type 'string'. [ng] Type 'null' is not assignable to type 'string'. [ng] [ng] 47 export interface DatabaseSnapshotExists<T> extends firebase.database.DataSnapshot { [ng] ~~~~~~~~~~~~~~~~~~~~~~ [ng] [ng] [ng] Error: node_modules/@angular/fire/compat/database/interfaces.d.ts:52:18 - error TS2430: Interface 'DatabaseSnapshotDoesNotExist<T>' incorrectly extends interface 'DataSnapshot'. [ng] Types of property 'forEach' are incompatible. [ng] Type '(action: (a: DatabaseSnapshot<T>) => boolean) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'. [ng] Types of parameters 'action' and 'action' are incompatible. [ng] Types of parameters 'a' and 'a' are incompatible. [ng] Type 'DatabaseSnapshot<T>' is not assignable to type 'IteratedDataSnapshot'. [ng] Type 'DatabaseSnapshotDoesNotExist<T>' is not assignable to type 'IteratedDataSnapshot'. [ng] Types of property 'key' are incompatible. [ng] Type 'string | null' is not assignable to type 'string'. [ng] Type 'null' is not assignable to type 'string'. [ng] [ng] 52 export interface DatabaseSnapshotDoesNotExist<T> extends firebase.database.DataSnapshot {