1.1.1 • Published 2 years ago
mailjet-js v1.1.1
Mailjet-JS
Overview
Checkout official documentation from Mailjet Node v3 Github.
Installation
npm install mailjet-js
FAQ
Differences from official client
At API level it is compatible with v3 client, but it includes following changes
- Supports only
Node 16.x
above - Uses native promises
- Free from any security warnings due to updated dependencies
- Typescript typings
Using with webpack or esbuild
This library is using vm2
through nested dependencies, bundling this library
may give you this error
Error: ENOENT: no such file or directory, open '/home/node/app/lib/contextify.js'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at loadAndCompileScript (/home/node/app/lib/server.js:576:35)
at /home/node/app/lib/server.js:579:14703 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/node/app/lib/contextify.js'
}
Simple solution to this problem is to mark vm2
an external dependency. For this
you can use
- external for
esbuild
- webpack-node-externals for
webpack