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 'DataSnapshot' of undefined #164

Open
dan-wu-open opened this issue Aug 30, 2022 · 1 comment
Open

Cannot read property 'DataSnapshot' of undefined #164

dan-wu-open opened this issue Aug 30, 2022 · 1 comment

Comments

@dan-wu-open
Copy link

Version info

firebase-functions-test: 2.3.0

firebase-functions: 3.21.2

firebase-admin: 10.2.0

Bug

Throws an error "Cannot read property 'DataSnapshot' of undefined". https://github.com/firebase/firebase-functions-test/blob/master/src/cloudevent/generate.ts#L44

database is not exported from firebase-functions until version 3.22.0. https://github.com/firebase/firebase-functions/pull/1127/files#diff-3b2670242bbd05b6c18120f99c3e59ad0500d7c3227d3c548727f21b53b78282R43

Fix

Upgrade firebase-functions to 3.22.0 worked for me. I see it's a peerDependency, so the README just needs to be updated.

I tried opening a PR but I don't have permission.

@CorieW
Copy link

CorieW commented Dec 20, 2024

Based on this, perhaps NOTE: This library can only be used with firebase-functions v3.20.1 or above. (in README.md) could be modified to v3.22.0.

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

No branches or pull requests

2 participants