DEP0040 🟩 Node.js

DeprecationWarning: The `punycode` module is deprecated (DEP0040)

A dependency imports Node’s built-in punycode module, deprecated since Node 21.

Seen on: Node.js

Meaning

Usually harmless; it comes from older versions of packages like whatwg-url/tr46 (used by node-fetch, eslint, etc.).

Common causes

  • Old transitive dependency (tr46/whatwg-url/node-fetch 2)
  • Your code importing 'punycode'

⚡ Quick fix

  1. Update dependencies (npm update / npm ls punycode to find the source)
  2. Ignore if harmless, or silence with --no-deprecation in production

Detailed fix by platform

Node.js

  1. npm ls punycode

How to diagnose

  1. Source — Which package requires it?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.