mjmlio / mjml

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

DeprecationWarning: The `punycode` module is deprecated on node 21 #2843

Open srghma opened 4 months ago

srghma commented 4 months ago

To Reproduce

$ node -v
v21.0.0

multiline_string="
<mjml>
  <mj-head>
    <mj-breakpoint width="320px" />
  </mj-head>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>
          Hello World!
        </mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
"

# Echo the multiline string to a file in the temporary directory
echo "$multiline_string" > /tmp/multiline_file.txt

node --trace-deprecation node_modules/.bin/mjml -- /tmp/multiline_file.txt -s
...compiled output

(node:460032) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
    at loadBuiltinModule (node:internal/modules/helpers:102:7)
    at Module._load (node:internal/modules/cjs/loader:995:17)
    at Module.require (node:internal/modules/cjs/loader:1229:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/srghma/projects/adsfasdf/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)

Expected behavior no warning to stderr

MJML environment (please complete the following information):

iRyusa commented 3 months ago

Looks to be related to web-resource-inliner which is used in Juice. IDK if they gonna fix it on their end ?

alfonsrv commented 1 month ago

Unlikely. web-resource-inliner (the maintainer of juice) is looking for someone to take over their repo (https://github.com/Automattic/juice/issues/399)

I have opened an issue on the repo, but this issue has been around for quite some time now. https://github.com/jrit/web-resource-inliner/issues/84