Closed Zerkley closed 2 days ago
I get this with node --loader ts-node/esm myscript.ts
, no React or anything:
import { Client } from 'node-mailjet';
^^^^^^
SyntaxError: Named export 'Client' not found. The requested module 'node-mailjet' is a CommonJS module, which may not support all module.exports as named exports.
@Zerkley ??
Hello, I get this error:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/node-mailjet.js?v=38aae28a' does not provide an export named 'default' (at useMail.tsx:1:1)
when trying to import the dependency. It is the same error when I import like:
import { Client } from 'node-mailjet';
or
import Mailjet from 'node-mailjet';
I'm using it in a React web, using Typescript.