Unable to import Firebase Firestore getCountFromServer in Angular "firebase": "^9.8.3",

365 views Asked by At

Im trying to get the total count of documents in a subcollection within the Firestore using the "Count documents with aggregation queries" base of the Firebase documentation Count documents with aggregation queries in an Angular application.

I've tried importing from @angular/fire/firestore and firebse/firestore.

But prompt error: "has no exported member named 'getCountFromServer'. Did you mean 'getDocFromServer'?"

enter image description here

1

There are 1 answers

0
Dhivya On BEST ANSWER

'getCountFromServer' was introduced in the firebase version 9.11.

You have to install either 9.11 or install the latest to get all the features.