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 module is deprecated #111

Closed
milahu opened this issue Feb 13, 2024 · 4 comments
Closed

punycode module is deprecated #111

milahu opened this issue Feb 13, 2024 · 4 comments

Comments

@milahu
Copy link

milahu commented Feb 13, 2024

this warning shows at the end of every restringer run

(node:65863) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

i am installing dependencies with pnpm install so im ignoring the npm lockfile

@BenBaryoPX
Copy link
Collaborator

@milahu Thanks for reaching out.
I can't reproduce on my machine. I've cloned and installed using pnpm, but didn't get the error.
If you can provide a minimal reproducible example I can continue to investigate the issue.

@milahu
Copy link
Author

milahu commented Feb 15, 2024

this is with node version 21

yarn solves this by using punycode from NPM

see also

https://stackoverflow.com/questions/68774489/punycode-is-deprecated-in-npm-what-should-i-replace-it-with

@BenBaryoPX
Copy link
Collaborator

I see. On version 21 it does show this error.
This is something to do with nested dependencies:

restringer@1.10.2
├─┬ eslint@8.56.0
│ └─┬ ajv@6.12.6
│   └─┬ uri-js@4.4.1
│     └── punycode@2.3.1 deduped
└─┬ jsdom@23.2.0
  ├─┬ tough-cookie@4.1.3
  │ └── punycode@2.3.1
  └─┬ whatwg-url@14.0.0
    └─┬ tr46@5.0.0
      └── punycode@2.3.1 deduped

Unfortunately, the only fix I can think of right now is living with the error until the dependencies are updated.
You can roll back to a previous Node.js version where this error doesn't show up, but since it's not a direct dependency on my side, I don't think there's anything for me to do here.

I'll be closing the issue, but I'll be happy for other recommendations if anyone has any - feel free to re-open the issue.

@BenBaryoPX BenBaryoPX closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@milahu
Copy link
Author

milahu commented Feb 15, 2024

aah, the joy of waiting for maintainers...

fixed

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