mailjet / mailjet-apiv3-nodejs

[API v3] Official Mailjet API v3 NodeJS wrapper
https://dev.mailjet.com
MIT License
236 stars 69 forks source link

TypeError: Mailjet is not a constructor #286

Closed GaddMaster closed 1 week ago

GaddMaster commented 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

GaddMaster commented 1 week ago

Silly mistake my side, tried importing mailjet into the client-side codebase by accident !