Skip to content

Cannot read property 'DataSnapshot' of undefined #164

Open
@dan-wu-open

Description

@dan-wu-open

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions