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

**Code:** `DEP0040` · **Category:** Node.js · **Seen on:** Node.js

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

## 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.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nodejs/dep0040-punycode-deprecated)
