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

The punycode module is deprecated. #577

Closed
pfloretz opened this issue Nov 1, 2023 · 2 comments
Closed

The punycode module is deprecated. #577

pfloretz opened this issue Nov 1, 2023 · 2 comments

Comments

@pfloretz
Copy link

pfloretz commented Nov 1, 2023

I started to get these errors when I upgraded Node to 21.1.0.

It does not affect functionality, but is an annoyance. I can downgrade back to 20.9 for now, but I am curious if changes will be made to address this.

Thank you for httpyac command line, it's a great tool.

@AnWeber
Copy link
Owner

AnWeber commented Nov 1, 2023

I myself do not use punycode directly. One of my dependencies is to blame.

(node:16278) [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:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
    at loadBuiltinModule (node:internal/modules/helpers:101:7)
    at Module._load (node:internal/modules/cjs/loader:1001:17)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/home/andreas/github/httpyac/httpyac/node_modules/psl/index.js:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

psl appears to be a guilty party. This dependency is loaded with module tough-cookie, which uses npm packge punycode. created a pr which resolves issue, but the repo is not really active. Maybe we are lucky

@AnWeber
Copy link
Owner

AnWeber commented Nov 6, 2023

@pfloretz My guess is that psl will no longer be updated and will no longer work with node >21. Tough-cockie's plan is to sit it out and run into the problem unexpectedly with the next LTS.
My plan is similar right now. I'm now waiting to see if tough-cookie changes his mind due to usage in other large projects which got the same error (e.g. jsdom, cypress). Until then, I can only offer you the workaround of enabling --no-deprecation and suppressing the warning.

node --no-deprecation /home/.../node_modules/httpyac/bin/httpyac.js send headers.http

@AnWeber AnWeber closed this as completed Nov 6, 2023
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

2 participants