wix-incubator / mjml-react

React component library to generate the HTML emails on the fly
MIT License
993 stars 50 forks source link

ModuleNotFoundError #13

Closed essamamdani closed 5 years ago

essamamdani commented 5 years ago

I am having an error when i tried it in Codesandbox. Please assist it why it omits this error.

Could not find module in path: 'uglify-js/lib/utils.js' relative to '/node_modules/uglify-js/tools/node.js'

mastertheblaster commented 5 years ago

Hi,

Seems related to https://github.com/mjmlio/mjml/issues/1365, checking if we could fix this somehow. You can install the mjml and try importing it `import mjml2html from 'mjml'. As the result you would get exactly same error.

mastertheblaster commented 5 years ago

Based on the comments inside https://github.com/mjmlio/mjml/issues?q=is%3Aissue+webpack+is%3Aclosed closed issues, the latest mjml is not supported inside browser environment. They do suggest implementing it on a server side. So very sorry, but in best effort we need to identify the root cause and make a PR for the mjml itself.

And currently closing this issue, cause it's the problem of underlying project.