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

TypeError when parsing mjml-chart #77

Open
th-alexis opened this issue Sep 26, 2022 · 1 comment
Open

TypeError when parsing mjml-chart #77

th-alexis opened this issue Sep 26, 2022 · 1 comment

Comments

@th-alexis
Copy link

th-alexis commented Sep 26, 2022

Hi devs,

I get the error:

TypeError: component.getTagName is not a function
    at ~/node_modules/mjml-parser-xml/lib/index.js:60:141
    at ~/node_modules/lodash/fp/_baseConvert.js:34:28
    at arrayMap (~/node_modules/lodash/_arrayMap.js:16:21)
    at map (~/node_modules/lodash/map.js:50:10)
    at wrapper (~/node_modules/lodash/_createHybrid.js:87:15)
    at ~/node_modules/lodash/fp/_baseConvert.js:455:19
    at wrapper (~/node_modules/lodash/_createHybrid.js:87:15)
    at ~/node_modules/lodash/_createFlow.js:71:31
    at MJMLParser (~/node_modules/mjml-parser-xml/lib/index.js:60:155)
    at mjml2html (~/node_modules/mjml-core/lib/index.js:219:39)

When adding the mj-chart tag to my mjml file. It happened just after adding the .mjmlconfig file, before that the chart was not showing on the emails.

If you guys need anything else from me let me know.

Thanks

mjml v4.10.1
mjml-chart v4

@th-alexis th-alexis changed the title TypeError when parsing mjml TypeError when parsing mjml-chart Sep 26, 2022
@btourman
Copy link
Collaborator

btourman commented Oct 1, 2022

Hi @th-alexis,

I think the problem comes from the compatibility between mjml and mjml-chart version you use.
mjml-chart v5.x.x is built for MJML4 and mjml-chart v4.x.x is built for MJML3

Could you try with mjml-chart v5 ? And let me know if you have the same error

Thanks

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