Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '@faire/mjml-react/utils/render' #108

Open
Jarrodsz opened this issue Dec 5, 2023 · 2 comments
Open

Cannot find module '@faire/mjml-react/utils/render' #108

Jarrodsz opened this issue Dec 5, 2023 · 2 comments

Comments

@Jarrodsz
Copy link

Jarrodsz commented Dec 5, 2023

In a new remix v2 project im getting a

Cannot find module '@faire/mjml-react/utils/render' 

the file exists.

I suspect the new remix v2 esm like stuff is breaking this.

What is the best advice to resolve this?

@Jarrodsz
Copy link
Author

Jarrodsz commented Dec 5, 2023

basically this module import is failing:

import {render} from "@faire/mjml-react/utils/render";

@emmclaughlin
Copy link
Collaborator

Hi @Jarrodsz,

Unfortunately I have not used remix v2 with mjml-react, so I don't know the best way to fix this. I would need to know more about your setup to help debug the problem.

In general though, the render function in mjml-react is just one way of rendering mjml-react to html and isn't necessarily the best way for every application. It should be easy to implement your own. Under the hood it is just ReactDOMServer.renderToStaticMarkup to convert the react mjml to mjml, mjml2html to convert the mjml to html, and a minifier to minify the html (this is optional, and any minifier should work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants