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

Problem with usage in create-react-app application. #1108

Closed
siciarek opened this issue Mar 30, 2018 · 7 comments
Closed

Problem with usage in create-react-app application. #1108

siciarek opened this issue Mar 30, 2018 · 7 comments

Comments

@siciarek
Copy link

I use mjml in my react app (create-react-app based).
Everything works fine when i use

"mjml": "^3.3.5",

After the upgrade to

"mjml": "^4.0.3",

Error occurs.

Error: Cannot find module "."

Steps to reproduce the error

$ create-react-app mjml-upgrade
$ cd mjml-upgrade
$ npm i -S mjml

in file index.js import mjml

import mjml2html from 'mjml'

run the app

$ nmp start

Error should occur.

zrzut ekranu 2018-03-30 o 12 13 06

@iRyusa
Copy link
Member

iRyusa commented Apr 9, 2018

Hi @siciarek

MJML4 wasn't really browser tested so build will most likely fail with webpack. Can you share the full stack of it so we can investigate if it's an easy fix ?

@siciarek
Copy link
Author

webpackMissingModule
node_modules/uglify-js/tools/node.js:18
(anonymous function)
node_modules/uglify-js/tools/node.js:18
./node_modules/uglify-js/tools/node.js
node_modules/uglify-js/tools/node.js:17
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
fn
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:88
./node_modules/html-minifier/src/htmlminifier.js
node_modules/html-minifier/src/htmlminifier.js:8
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
fn
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:88
./node_modules/mjml-core/lib/index.js
node_modules/mjml-core/lib/index.js:61
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
fn
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:88
./node_modules/mjml/lib/index.js
node_modules/mjml/lib/index.js:7
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
fn
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:88
./src/index.js
http://localhost:3000/static/js/bundle.js:156239:63
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
fn
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:88
0
http://localhost:3000/static/js/bundle.js:156403:18
__webpack_require__
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:678
./node_modules/ansi-regex/index.js.module.exports
/Users/siciarek/Workspace/mjml-upgrade/webpack/bootstrap ef69e669aec378bf1cbf:724
(anonymous function)
http://localhost:3000/static/js/bundle.js:728:10

@siciarek
Copy link
Author

zrzut ekranu 2018-04-11 o 17 44 46

@iRyusa
Copy link
Member

iRyusa commented Apr 11, 2018

Looks like it doesn't like the require of html-minifier.

I'm not 100% that we can do something about it 🤔

@iRyusa
Copy link
Member

iRyusa commented Apr 30, 2018

As it's a dependency issue I don't think we can really do something about it yet, feel free to open a PR if you want to work on that, but browser build isn't in our test scope.

@iRyusa iRyusa closed this as completed Apr 30, 2018
@mvfsillva
Copy link

Hi @siciarek, have you found any solutions to this problem?

@siciarek
Copy link
Author

siciarek commented Jul 17, 2019 via email

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

No branches or pull requests

3 participants