Closed Martiinii closed 4 weeks ago
Interesting, this could be related to the changes on https://github.com/resend/react-email/releases/tag/%40react-email%2Fmarkdown%400.0.9 as well
Could be. I just want to clarify, in my project I've used latest @react-email/components and tested each Tailwind component from @react-email/tailwind versions and 0.0.14 was the last without this issue.
How about the latest canary for @react-email/ŧailwind
@Martiinii? Does it also give the same error?
worked for me with "0.0.16-canary.1"
If others want to use this as workaround, it's important to check that you import { Tailwind } from @react-email/tailwind and not from @react-email/components.
Can confirm, works in 0.0.16-canary.1
. Use it as temporary solution.
It would be great to push this to a main release, soon. Lost about an hour trying to figure out why my emails weren't sending anymore. 🙏
Describe the Bug
When wrapping Markdown element with Tailwind, render/renderAsync throws error. Introduced somewhere between @react-email/tailwind@0.0.14 and 0.0.15. Full error is:
Error: marked(): input parameter is of type [object Array], string expected Please report this to https://github.com/markedjs/marked.
Which package is affected (leave empty if unsure)
@react-email/tailwind
Link to the code that reproduces this issue
https://github.com/Martiinii/react-email-error
To Reproduce
With installed react-email server and min @react-email/tailwind@0.0.15 use this email:
Or use linked repo:
npm i
thennpm run dev
It will return an error Tailwind throws Error: marked(): input parameter is of type [object Array], string expected. I've managed to trace the error to first happen in 0.0.15 (haven't tested in canary versions).Expected Behavior
Should render without throwing an error, just like in previous versions.
What's your node version? (if relevant)
No response