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

Warning about MJML missing when using MRML #117

Closed
spickermann opened this issue Jan 19, 2024 · 5 comments · Fixed by #118
Closed

Warning about MJML missing when using MRML #117

spickermann opened this issue Jan 19, 2024 · 5 comments · Fixed by #118

Comments

@spickermann
Copy link

Hey there,

I updated mjml-rails to 4.10.0 and enabled using mrml, an option that was added in #114. At the same time, I removed the dependency on mjml from package.json.

My Gemfile includes these lines:

gem 'mjml-rails'
gem 'mrml'

And my config/initializers/mjml.rb looks like this:

Mjml.setup do |config|
  config.use_mrml = true
  config.raise_render_exception = true
  config.template_language = :erb
end

I ran my test suite and mjml-rails seems to work as expected and renders emails using mrml just fine.

But when starting the application or running the specs, this warning in put out to the console:

Couldn't find the MJML 4. binary.. have you run $ npm install mjml?

I wouldn't expect this warning when mjml-rails is configured to use mrml and mrml is installed.

@johannesschobel
Copy link

Dear @spickermann ,

i am seeing the same issues, although not running mrml but the "plain" mjml.
I think, this issue is related to yarn. If you install mjml via npm instead of yarn, this works perfectly fine for me. However, this is kind of wonky, because the entire pipeline uses yarn.

I have described my finding in #108 so far.

Maybe you can provide additional information if you find something?

@johannesschobel
Copy link

i ended up running a

npm install -g mjml

in my Dockerfile that creates the image for my server to get rid of the issue.
However, obviously, i am looking for a better solution ;)

@sighmon
Copy link
Owner

sighmon commented Jan 20, 2024

@spickermann I'm having trouble replicating it in my project. Would you be able to submit a PR for the fix?

@sighmon
Copy link
Owner

sighmon commented Jan 22, 2024

@spickermann Does this branch solve the warning for you? #118

sighmon added a commit that referenced this issue Feb 1, 2024
…h-mrml

#117 Warning about MJML missing when using MRML
@spickermann
Copy link
Author

@sighmon I am sorry for not responding to your questions. Yes, the current master branch is fixing the issue. Thank you!

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

Successfully merging a pull request may close this issue.

3 participants