mjml: EmptyMJMLError with included header
So i updated my globally installed mjml from 3.0.2 to 3.2.2 and now I try to compile something where i have use mj-include for a header part and get this error (it worked with the older version):
Error: [MJMLError] EmptyMJMLError: No root "<mjml>" or "<mj-body>" found in the file, or "<mj-body>" is empty
Is this working as intended?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (6 by maintainers)
Just put the
<mj-include path="head.mjml" />insidemj-containerand then it should work. You can’t have more than 1 elements insidemj-bodyHi @jdotjdot, as iRyusa said please open a new issue and provide the exact mjml you’re using, I was unable to reproduce this issue. @mrksbnch I tested with your example above, and it turns out the
<mj-head>is not properly closed in hero.mjml, the/is missing. If i add it then the include renders correctly.