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
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/khali/js_workspace/heim/node_modules/nodemailer-express-handlebars/index.js from /home/khali/js_workspace/heim/src/services/mailer.ts not supported.
Instead change the require of index.js in /home/khali/js_workspace/heim/src/services/mailer.ts to a dynamic import() which is available in all CommonJS modules.
I am getting the above error when I import the package as see below in my code:
I have tried to dynamically import the module at runtime like this: const hbs = (await import('nodemailer-express-handlebars')).default;
and like this: const { default: hbs } = await import('nodemailer-express-handlebars');
but still didn't work.
I am getting the above error when I import the package as see below in my code:
I have tried to dynamically import the module at runtime like this:
const hbs = (await import('nodemailer-express-handlebars')).default;
and like this:
const { default: hbs } = await import('nodemailer-express-handlebars');
but still didn't work.
Here is my package.json if needed:
And my tsconfig.json
The text was updated successfully, but these errors were encountered: