I'm getting a new error in Angular after a maintenance npm upgrade where no direct dependency versions changed.
ng serve produces this error and the build fails:
[ng]
[ng] Error: node_modules/rxfire/firestore/lite/interfaces.d.ts:8:29 - error TS2314: Generic type 'AggregateQuerySnapshot<T>' requires 1 type argument(s).
[ng]
[ng] 8 export type CountSnapshot = lite.AggregateQuerySnapshot<{
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] 9 count: lite.AggregateField<number>;
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] 10 }, any, DocumentData>;
[ng] ~~~~~~~~~~~~~~~~~~~~~
[ng] × Failed to compile.
How can I fix this?
I already reinstalled the full project from scratch. Package dependencies match angular fire instructions:
"dependencies": {
"@angular/common": "^15.2.2",
"@angular/core": "^15.2.2",
"@angular/fire": "^7.5.0",
"@angular/forms": "^15.2.2",
"@angular/platform-browser": "^15.2.2",
"@angular/platform-browser-dynamic": "^15.2.2",
"@angular/router": "^15.2.2",
"@angular/service-worker": "^15.2.2",
"firebase": "^9.17.1",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
},
I resolved this issue by force installing rxfire version 6.0.3
npm install [email protected]
I had to restart ng serve as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With