I am trying to deploy my firebase function to cloud but getting an error:
Error: Error parsing triggers: Cannot find module 'EmailData'
1.I compile my ts file to js.
2.the build of ts ok... my code looks like:
the ts that importing the file...
var EmailDataClass = require("EmailData");
and the file it self:
class EmailData {....
}export = EmailData;
✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading... Error: Error parsing triggers: Cannot find module 'EmailData'
It's not recommended to use mix of Typescript & ES6 export and import methods
it's better to use type script import
import { EmailDataClass } from "./EmailData";
And to Export use
export class EmailData {....
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With