Warning in Node v22: DeprecationWarning: The punycode
module is deprecated.
#3114
Labels
status: blocked 🚧
Resolution is blocked by some other issue or external factor
type: bug 🐛
Something isn't working
@vendure/core
Describe the bug
When running a Vendure server instance with Node v22+, you will see the following warning logged:
Running with the
--trace-deprecation
flag yields:We can see that the issue originates in the whatwg-url package, which is a dependency of node-fetch v2.x, which in turn is a dependency of several packages used in Vendure core packages:
That version of
whatwg-url
which imports the deprecatedpunycode
module is outdated. Newer versions have removed that.However, only the v3.x of
node-fetch
has updated to the newerwhatwg-url
version.Why node-fetch v2.x?
The latest version of node-fetch is v3.3.2, and it does not use this outdated version of
whatwg-url
. So why don't packages just update to the latestnode-fetch
?Basically because v3.x of
node-fetch
is ESM only. This has knock-on implications for any project that depends on it:So right now there's no clear way around this warning in Node v22 until our upstream dependencies figure out how to deal with it.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: