Error: node_modules/rxfire/firestore/lite/interfaces.d.ts:8:29 - error TS2314: Generic type 'AggregateQuerySnapshot<T>' requires 1 type argument(s).
Version info
Angular: 16.2.0
Firebase: 9.8.0
AngularFire: 7.6.1
macOS: 13.6
Windows: 11
Node.js: 20.5.0
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
Just open this link https://stackblitz.com/edit/stackblitz-starters-f3s8vh, the app will run automatically, and the error will be in the terminal.
Steps to set up and reproduce
a
Sample data and security rules
a
Debug output
** Errors in the JavaScript console **
Error: node_modules/rxfire/firestore/lite/interfaces.d.ts:8:29 - error TS2314: Generic type 'AggregateQuerySnapshot<T>' requires 1 type argument(s).
8 export type CountSnapshot = lite.AggregateQuerySnapshot<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 count: lite.AggregateField<number>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 }, any, DocumentData>;
** Output from firebase.database().enableLogging(true); **
a
** Screenshots ** a
Expected behavior
ng serve execution succeeds.
Actual behavior
a
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Getting same issue with the following config
"dependencies": {
"@angular/animations": "^15.2.9",
"@angular/common": "^15.2.9",
"@angular/compiler": "^15.2.9",
"@angular/core": "^15.2.9",
"@angular/fire": "7.5",
"@angular/forms": "^15.2.9",
"@angular/platform-browser": "^15.2.9",
"@angular/platform-browser-dynamic": "^15.2.9",
"@angular/router": "^15.2.9",
"firebase": "^9.23.0",
"rxfire": "^6.0.5",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.9",
"@angular/cli": "^15.2.9",
"@angular/compiler-cli": "^15.2.9",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.8.4"
}
Error: node_modules/rxfire/firestore/lite/interfaces.d.ts:8:29 - error TS2314: Generic type 'AggregateQuerySnapshot<T>' requires 1 type argument(s).
8 export type CountSnapshot = lite.AggregateQuerySnapshot<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 count: lite.AggregateField<number>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 }, any, DocumentData>;
EDIT: Found solution
Temporary solution is to npm i [email protected], but I don't know the side effects of this solution.
I have the same problem, with a brand new application. I use Angular Cli version 16.2.4 and Angular 16.2.7. After adding AngularFire (version 7.6.1) with ng add @angular/fire, I get the error:
Error: node_modules/rxfire/firestore/lite/interfaces.d.ts:8:29 - error TS2314: Generic type 'AggregateQuerySnapshot<T>' requires 1 type argument(s).
8 export type CountSnapshot = lite.AggregateQuerySnapshot<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 count: lite.AggregateField<number>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 }, any, DocumentData>;
See: https://github.com/FirebaseExtended/rxfire/issues/88#issuecomment-1715851191