mjml
mjml copied to clipboard
DeprecationWarning: The `punycode` module is deprecated on node 21
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):
- OS: Nixos
- mjml-core: 4.15.3
- mjml-cli: 4.15.3
Looks to be related to web-resource-inliner which is used in Juice. IDK if they gonna fix it on their end ?
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
Anyone know of a workaround for this?
Not for now, I've opened a PR on web-resource-inliner, let's hope they will be able to merge it :D
^ has been merged and released
Juice is still using the 6.x version of this so it's still not available yet
Thank you @iRyusa @jrit! I opened a PR for Juice: https://github.com/Automattic/juice/pull/497
Alright @iRyusa on to you
I should be able to release in the next build of MJML5 where I need to tweak few things in it