Closed jaqarrick closed 1 year ago
@juandav Hello, I'm also experiencing the same issue. MRE https://github.com/bebjakub/nest-mailer-mjml-test
@juandav Thank you a lot! When do you plan the release, pls? The last release was 3 years ago,... https://www.npmjs.com/package/@nest-modules/mailer Thank you!
Hi @jaqarrick , I tested your PR, but for me works only import mjml2html = require('mjml')
as a solution from this issue https://github.com/mjmlio/mjml/issues/2430 or https://github.com/mjmlio/mjml/issues/1387#issuecomment-441999401
How did you achieve working it with import * as mjml2html from 'mjml'
?
Thank you!
Did you solve it? @bebjakub
@carlos3g I duplicated MjmlAdapter and imported mjml with import mjml2html = require('mjml');
Description
When using the
MjmlAdapter
from the mailer module I get the following error when the compile function is invoked:To Reproduce In my email module imports I have the following
When I call the
mailerService.sendMail
function the error is thrown.Expected behavior The function should successfully compile mjml to html
Suggested Solution I would suggest updating the import statement here to
I've recreated the adapter locally outside of the package and this solution works.
Let me know if I'm missing something!