{“severity”:”ERROR”,”message”:”Unhandled error TypeError: undefined is not a promise

{"severity":"ERROR","message":"Unhandled error TypeError: undefined is not a promise\nat Promise (<anonymous>)\n..at newHandler (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:305:16)\nat func (../functions/node_modules/firebase-functions/lib/providers/https.js:273:32)\nat ../functions/node_modules/firebase-functions/lib/providers/https.js:293:44\nat cors (../functions/node_modules/cors/lib/index.js:188:7)\nat originCallback (../functions/node_modules/cors/lib/index.js:214:15)\n

Check about the definition of your Promise function

const myFunction = (email) => {
return new Promise((resolve, reject) => {
anotherFunc
.then((res) => {
resolve(res)
})
.catch((err) => reject(err))
})
}

I’ve missed the new keyword before ‘Promise’