-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"[DEP0040] The punycode
module is deprecated" with Node.js 21.x
#9005
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm also getting this on latest MacOS (sonoma) in Terminal. Admitted n00b to all this, but here is the info asked for just above in case it helps:
|
Hi @arcanis I'm involved with the GitHub JavaScript action cypress-io/github-action which supports both Yarn Classic and Yarn Modern, so I'm happy that there will be a patch for Yarn Classic. I fully understand the general advice to migrate though. Many thanks! |
@erikspears Try to downgrade node to 20.9.0 version. I had similar problem and this help me |
Fixed in #9009 |
|
Yes, we're working on that. We don't release 1.x often, so the CI is unfortunately a little unstable - it may take us a day or two to propagate all the archives. |
Thanks for fixing the deprecation issue and good luck in resolving the publication issues as well! |
I am still seeing this issue with
|
|
I hit this today on Mac OS 14.1.1 (23B81). Thanks for planning the fix . |
(node:15108) [DEP0040] DeprecationWarning: The |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Original : bitwarden/clients#6689 (comment) solution that worked for me: and then in node_modules go to the directory tr46 > index.js // Replace this: basically just add a trailing forward slash |
Reverting to node version 20.5.1 worked for me. (Incase you're frustrated and looking for a quick solution to get rid of the warning) Step 1. Install NVM Windows
Linux
Step 2. NVM install and use node version 20.5.1 nvm install 20.5.1
nvm use 20.5.1 |
The LTS version according to https://nodejs.org/en is |
Thank you. I was rushing for a fix. I'll consider this. |
still got same error |
|
just downgrade to In cmd
Done |
thanks minav that ruined my proj |
I don't even use punycode in my project and this somehow was installed by pnpm.
|
I upgraded Node to 21.5 and now I'm also getting this issue. Any issue if I ignore this warning? |
It's only a warning that it could stop working in some future Node.js version > |
Hi Mike, Thanks for confirming. I'll keep checking this space for upgrade. Have a good day. |
Thanks for this. Good to know there is a workaround. My specific error response by the way is stated below. I currently get it on every single node.js project I create. (node:1692) [DEP0040] DeprecationWarning: The |
Remove node.js and install node.js LTS version. It will fix the issue. |
v21.5.0 still has this message |
|
Many Yarn Classic commands including
provoke a deprecation warning under Node.js current version
21.x
.Yarn version
Yarn Classic
v1.22.19
Steps to reproduce
For example, with Node.js
21.1.0
installed, execute:shows
Further debug information is output by:
NODE_OPTIONS='--trace-deprecation' yarn info yarn description
Comments
The History section of DEP0040 in the Node.js documentation shows that Node.js
punycode
has been deprecated since Node.js v7.0.0 in Oct 2016 and, starting with Node.js v21.0.0, this has been changed to a runtime deprecation (see nodejs/node#47202). The runtime deprecation is what has caused it to now become visible.Node.js v21.0.0 was released on Oct 17, 2023 as the first release of the
21.x
major version, so the issue is quite new. Because Yarn Classic v1 is frozen I don't expect this deprecation to be fixed. I'm just sharing because I was confused the first time I saw it and I mistakenly thought that the package I was installing withyarn add
was causing the message, not Yarn Classic itself.(For completeness I mention https://nodejs.org/dist/latest-v21.x/docs/api/punycode.html in combination with the comment in the https://github.com/mathiasbynens/punycode.js#installation section of the userland module about how to fix.)
I'm not seeing
DEP0040
shown by Yarn Modernstable
4.0.1
, so migrating to Yarn Modern would be a logical mitigation for the deprecation message caused by Yarn Classic.The text was updated successfully, but these errors were encountered: