Closed GaddMaster closed 1 week ago
const sender = process.env.MAILJET_SENDER; const apiKey = process.env.MAILJET_API_KEY; const apiSecret = process.env.MAILJET_SECRET_KEY;
const Mailjet = require("node-mailjet"); const mailjet = new Mailjet({ apiKey, apiSecret });
Unhandled Runtime Error TypeError: Mailjet is not a constructor
Library is broken, shows in docs to use like this but broke like this !?
Daniel
Silly mistake my side, tried importing mailjet into the client-side codebase by accident !
const sender = process.env.MAILJET_SENDER; const apiKey = process.env.MAILJET_API_KEY; const apiSecret = process.env.MAILJET_SECRET_KEY;
const Mailjet = require("node-mailjet"); const mailjet = new Mailjet({ apiKey, apiSecret });
Unhandled Runtime Error TypeError: Mailjet is not a constructor
Library is broken, shows in docs to use like this but broke like this !?
Daniel