Skip to content
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

Punycode deprecation warning on node js > 20 #275

Closed
kuselan84 opened this issue Jun 7, 2024 · 5 comments
Closed

Punycode deprecation warning on node js > 20 #275

kuselan84 opened this issue Jun 7, 2024 · 5 comments

Comments

@kuselan84
Copy link

Following deprecation warning appear after update of node js to version 22:

(node:64556) [DEP0040] DeprecationWarning: The punycodemodule is deprecated. Please use a userland alternative instead.

@domenic
Copy link
Member

domenic commented Jun 7, 2024

This package does not use the built-in punycode module so this is not the appropriate repository.

@domenic domenic closed this as completed Jun 7, 2024
@graffhyrum
Copy link

The issue is likely from node-fetch,
see node-fetch/node-fetch#1797

@ve3
Copy link

ve3 commented Jul 23, 2024

Result from --trace-deprecation.

(node:17600) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
at node:punycode:3:9
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
at loadBuiltinModule (node:internal/modules/helpers:113:7)
at Module._load (node:internal/modules/cjs/loader:1053:17)
at Module.require (node:internal/modules/cjs/loader:1290:19)
at require (node:internal/modules/helpers:188:18)
at Object. (D:\my-app-path\node_modules\whatwg-url\lib\url-state-machine.js:2:18)
at Module._compile (node:internal/modules/cjs/loader:1455:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1534:10)

@wojtekmaj
Copy link

@ve3 But that's version 5.0 or similar :D

@robbieaverill
Copy link

For others coming across this who may also be using older whatwg-url versions (probably not deliberately), there's a helpful solution here: #261 (comment)

Note that punycode was removed from this library at v9.0.0, so anything newer than that will remove the deprecation warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants