You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider following snippet from my project using ES modules:
import simpleParser from 'nodemailer';
let stream;
simpleParser(stream, (err, parsed) => {});
Running it would throw
TypeError: simpleParser is not a function
at file:///home/taro/projects/onefleet-worktrees/dev/B/services/location/test.ts:3:1
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)
Then, when I look into node_modules/mailparser/index.js, I see that require imports are used.
nodemailer version:
6.8.0
Consider following snippet from my project using ES modules:
Running it would throw
Then, when I look into
node_modules/mailparser/index.js
, I see thatrequire
imports are used.Does that mean I cannot use your package unless I switch back to CJS or is there another way?
Cheers.
The text was updated successfully, but these errors were encountered: