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

Cannot read property 'FirestoreAdminClient' of undefined #110

Open
agordeev opened this issue Jun 14, 2021 · 4 comments
Open

Cannot read property 'FirestoreAdminClient' of undefined #110

agordeev opened this issue Jun 14, 2021 · 4 comments

Comments

@agordeev
Copy link

I added a function for backing up Firestore database, and now all my tests that use firestore-jest-mock fail due to this error:

    TypeError: Cannot read property 'FirestoreAdminClient' of undefined

      1 | import * as admin from 'firebase-admin'
      2 | import * as functions from 'firebase-functions'
    > 3 | const client = new admin.firestore.v1.FirestoreAdminClient()

The function uses admin.firestore.v1.FirestoreAdminClient type, which doesn't seem to exist in firestore-jest-mock. Any ideas how to fix this?

@sbatson5
Copy link
Owner

Thanks for posting.

We don't currently have support for the v1 namespace (mostly because I've never used it). Do you know what major differences between the current firestore admin and the v1 are?

@pureimpro
Copy link

@agordeev have you found any solution ?
this issue seems to be related : 1827

@agordeev
Copy link
Author

@agordeev I stopped using firestore-jest-mock

@rodneyrd
Copy link

The fix in this comment 👉 firebase/firebase-admin-node#1827 (comment)

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

No branches or pull requests

4 participants