mjmlio / mjml

MJML: the only framework that makes responsive-email easy
https://mjml.io
MIT License
16.94k stars 954 forks source link

Error: URIError: URI malformed when validating mjml file #678

Closed quimpg closed 7 years ago

quimpg commented 7 years ago

I got this error when I try to validate o render a mjml file.

URIError: URI malformed at decodeURIComponent (native) at /usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:103:12 at /usr/local/lib/node_modules/mjml/node_modules/lodash/mapValues.js:38:34 at /usr/local/lib/node_modules/mjml/node_modules/lodash/_createBaseFor.js:17:11 at baseForOwn (/usr/local/lib/node_modules/mjml/node_modules/lodash/_baseForOwn.js:13:20) at mapValues (/usr/local/lib/node_modules/mjml/node_modules/lodash/mapValues.js:37:3) at mjmlElementParser (/usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:102:44) at /usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:116:14 at Array.map (native) at mjmlElementParser (/usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:115:8)

node v4.7.2 mjml 3.3.2

I tried to remove fields with href but the file doesn't validate

A Nueva alerta creada Acabas de activar la alerta que te detallamos a continuación:
  • Subasta de <%= $tipoBien %>
  • % my $title; % if ($municipio eq 'All') {
  • En <%= $provincia %> provincia
  • % } else { % $title = $municipio.', '.$provincia;
  • En <%= $municipio %>, <%= $provincia %> provincia
  • % }
  • Origen <%= reverse('sTipoSubasta',$type) %>

A partir de ahora recibirás por email las nuevas subastas que se publiquen con estos criterios.

Recuerda que en cualquier momento puedes eliminar esta alerta si ya no te interesa desde el siguiente enlace.

Dar de baja esta alerta
A

after some try error I found the problem is in this section

<mj-column>
  <mj-text font-size="14px" padding-left="10%" font-family="arial,sans-serif" padding-right="10%" color="#ccc"">
    <a href="#" style="color:#333;text-decoration:none;font-family:arial,sans-serif;font-weight:bold;font-size:20px;">A</a>
  </mj-text>
</mj-column>

I tried to introduce correct url on href but I got always the same URIError.

After removing the previous code from the mjml I got this error now

Error: EISDIR: illegal operation on a directory, open './/' at Error (native)

ngarnier commented 7 years ago

Hi @quimpg, can you please try to update your NodeJS version? LTS will be fine.

quimpg commented 7 years ago

solved! thanks! but the problem with URI was in this line with de final double quotes....

<mj-text font-size="14px" padding-left="10%" font-family="arial,sans-serif" padding-right="10%" color="#ccc"">

the problem or EISDIR solved with the nodejs update