Skip to content

[Bug]: "punycode" module is deprecated #15535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
caribou-code opened this issue Mar 6, 2025 · 4 comments
Open

[Bug]: "punycode" module is deprecated #15535

caribou-code opened this issue Mar 6, 2025 · 4 comments

Comments

@caribou-code
Copy link

Version

29.7.0

Steps to reproduce

  1. npm i [email protected] [email protected] -D
  2. Configure jest.config.js with testEnvironment: 'jsdom'
  3. Run unit tests for any React component

Expected behavior

No warnings from subdependencies

Actual behavior

A terminal warning:
punycode module is deprecated. Please use a userland alternative instead.`

Additional context

I believe this is due to jest-environment-jsdom consuming an old version of jsdom. The dependency chain looks like this: jest-environment-jsdom -> jsdom -> tough-cookie -> punycode.

Looking at the current state of the jest repo it looks like this might already be solved, since the package.json now requires version ^22.0.0 of jsdom. However, there isn't a release with the fix, and it looks like there's only been alpha releases of v30 for the last ~1.5 years, which makes me think we might be quite far off waiting for the major release to solve this.

Could a patch release be made on v29.7 to solve it?

Environment

OS: macOS 14.5
Node: 22.11.0
npm: 10.9.0
@leup
Copy link

leup commented Mar 11, 2025

For me, this warning happens when using Expo.
An issue exists on Expo repo:

expo/expo#33734

This library is only part of the problem as Expo uses a few library depending on punycode.
Would be nice to fix this with jest at least.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 10, 2025
@caribou-code
Copy link
Author

Any movement on this? I believe it just needs a patch release - the work is already done.

@github-actions github-actions bot removed the Stale label Apr 22, 2025
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants