[DEP0040] DeprecationWarning: The `punycode` module is deprecated
[DEP0040] DeprecationWarning: The `punycode` module is deprecated
What it means
The built-in punycode module is deprecated (DEP0040) and is slated for removal.
Why it happens
Node deprecated the built-in punycode module in favor of the userland package. The warning appears on Node 18+ and is loudest on Node 22, often emitted by a transitive dependency.
How to fix it
In your own code, depend on the userland package: `npm install punycode` then `require('punycode/')` (note the trailing slash).
If it comes from a dependency, upgrade it — many libraries have dropped the built-in punycode.
Find the source with `node --trace-deprecation`.
It is a warning, not a breaker — but resolve it before the module is removed in a future major.