Property 'child' in type 'DataSnapshot' is not assignable to the same property in base type 'DataSnapshot'. after updating
I am just reopening this so it gets attention as the comments in the closed issues might be overlooked.
node_modules/firebase-functions/lib/common/providers/database.d.ts:80:5 - error TS2416: Property 'child' in type 'DataSnapshot' is not assignable to the same property in base type 'DataSnapshot'.
Type '(childPath: string) => DataSnapshot' is not assignable to type '(path: string) => DataSnapshot'.
Call signature return types 'DataSnapshot' and 'DataSnapshot' are incompatible.
The types of 'forEach' are incompatible between these types.
Type '(action: (a: DataSnapshot) => boolean | void) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'.
Types of parameters 'action' and 'action' are incompatible.
Types of parameters 'a' and 'a' are incompatible.
Type 'DataSnapshot' is not assignable to type 'IteratedDataSnapshot'.
Types of property 'key' are incompatible.
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
80 child(childPath: string): DataSnapshot;
~~~~~
node_modules/firebase-functions/lib/common/providers/database.d.ts:100:5 - error TS2416: Property 'forEach' in type 'DataSnapshot' is not assignable to the same property in base type 'DataSnapshot'.
Type '(action: (a: DataSnapshot) => boolean | void) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'.
100 forEach(action: (a: DataSnapshot) => boolean | void): boolean;
Were you able to successfully deploy your functions?
No, as they cannot be built.
baraknaveh, ChrisYohann, juane1000, matt-hall-zory, gregfenton, fanwgwg, and HenningKuehl reacted with thumbs up emoji
ksinghal reacted with eyes emoji
All reactions
"@faker-js/faker": "^8.4.0",
"@types/google-libphonenumber": "^7.4.30",
"@types/nodemailer": "^6.4.14",
"axios": "^1.6.7",
"firebase-admin": "^12.0.0",
"firebase-functions": "^4.6.0",
"fp-ts": "^2.16.2",
"google-libphonenumber": "^3.2.34",
"meilisearch": "^0.37.0",
"nodemailer": "^6.9.8",
"urlcat": "^3.1.0",
"uuid": "^9.0.1"
The error I get is:
npm run build
> build
node_modules/firebase-functions/lib/common/providers/database.d.ts:80:5 - error TS2416: Property 'child' in type 'DataSnapshot' is not assignable to the same property in base type 'DataSnapshot'.
Type '(childPath: string) => DataSnapshot' is not assignable to type '(path: string) => DataSnapshot'.
Call signature return types 'DataSnapshot' and 'DataSnapshot' are incompatible.
The types of 'forEach' are incompatible between these types.
Type '(action: (a: DataSnapshot) => boolean | void) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'.
Types of parameters 'action' and 'action' are incompatible.
Types of parameters 'a' and 'a' are incompatible.
Type 'DataSnapshot' is not assignable to type 'IteratedDataSnapshot'.
Types of property 'key' are incompatible.
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
80 child(childPath: string): DataSnapshot;
~~~~~
node_modules/firebase-functions/lib/common/providers/database.d.ts:100:5 - error TS2416: Property 'forEach' in type 'DataSnapshot' is not assignable to the same property in base type 'DataSnapshot'.
Type '(action: (a: DataSnapshot) => boolean | void) => boolean' is not assignable to type '(action: (a: IteratedDataSnapshot) => boolean | void) => boolean'.
100 forEach(action: (a: DataSnapshot) => boolean | void): boolean;
~~~~~~~
Found 2 errors in the same file, starting at: node_modules/firebase-functions/lib/common/providers/database.d.ts:80