Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Firestore] Property 'aggregate' does not exist on type 'CollectionReference<DocumentData>' #2374

Closed
jeremytenjo opened this issue Nov 16, 2023 · 9 comments · Fixed by #2392
Assignees

Comments

@jeremytenjo
Copy link

Getting error when using aggregate in nodejs - "firebase-admin": "11.11.0"

image

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@yuliankarapetkov
Copy link

Same issue here blocking us from releasing a new feature. I can add that it seems like AggregateField is not exported at all from firebase-admin, although it seems to be exported from @google-cloud/firestore.

@Lootwig
Copy link

Lootwig commented Nov 21, 2023

Might this be a documentation problem? While the example for count works without issues when using v11.11.0, neither sum nor average can be used as described due to the methods not existing.

@carlosbloqhouse
Copy link

carlosbloqhouse commented Nov 24, 2023

The cause of this is the following.

@jeremytenjo
Copy link
Author

Great find! Thanks @carlosbloqhouse !

@yuliankarapetkov
Copy link

I think something else is still off.

Looking at the source I don't think AggregateField is exported from firebase-admin/firestore at all. In addition, aggregate() still seems to be missing as a method (see screenshot).

image

@lahirumaramba
Copy link
Member

Thanks @yuliankarapetkov for pointing this out. Should be fixed in #2396 and will be included in the major release next week. Thanks folks for your patience!

@jbuck-lineleap
Copy link

Thanks @yuliankarapetkov for the change and @lahirumaramba for the update - could you please let us know when this release will be out?

@lahirumaramba
Copy link
Member

The changes are now released in Firebase Admin Node.js v12.0.0. Thank you everyone for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants