Open alvindivina08 opened 1 month ago
I encountered the same error when running inside Next.js (latest version).
After adding "use client"
on the top of the tsx
file which includes renderToStaticMarkup(CONFIGURATION, { rootBlockId: 'email-builder-root' });
, new error encountered:
TypeError: Cannot read properties of undefined (reading 'Component')
> 14 | const string = renderToStaticMarkup(CONFIGURATION, { rootBlockId: 'email-builder-root' });
I have tried to work with renderToStaticMarkup
(from react/server
) and it works great, but I have no idea how to continue debugging..
I created an api that separates renderToStaticMarkUp from the next js main codebase. Now my app works fine and calls an api if it needs to convert json to html
Hi @alvindivina08, is it possible to share some details on how to resolve this issue?
Thanks a lot! ❤️
I have it in my repo and deployed it using vercel. Feel free to take a look and copy it
Thanks a lot!
First of all, thank you for making this open source!
is there any alternative to renderToStaticMarkup for NextJS?
I keep getting this error when I'm trying to compile it to a production build using NextJs