-
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 (Rev 2)
#9013
Comments
punycode
module is deprecated" with Node.js 21.xpunycode
module is deprecated" with Node.js 21.x (Rev 2)
The issue is also reproducible with npm install [email protected] -g
mkdir yarn-test
cd yarn-test
yarn init -y
yarn add yarn displays:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@MikeMcC399 can you send the output with |
The following is from WSL2 under Windows 11 with a virtual Ubuntu 22.04.3 environment and nvm as Node manager installed:
|
(node:15108) [DEP0040] DeprecationWarning: The |
@Mahi12333 Mahi12333 root@str-bot01:/# NODE_OPTIONS='--trace-deprecation' yarn info yarn description |
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.
Were you now able to reproduce? and if so, is there still an intention to fix the issue in Yarn Classic? |
Hi @shashi-appgolive is your issues resolved ? I am also getting this on node 19.9.0 version and mongo 7 |
Nope! Using local docker with mongo image. |
Is there solution to this issue because I can't find one: |
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.
@MikeMcC399 yeah, I was able to reproduce, I have no idea why it's doing that. I'll try to look into it further. |
Update: I spoke with the team, it looks like the cause was already identified and fixed, but has not been released yet. |
Hi, how you fixed this issue, mine is still not fixed, showing this error in my every project. |
Also still seeing this. Here's my deprecation output:
|
That is to be expected, since this issue is still open. It was however great to read #9013 (comment) which said:
so that leads me to believe that if we wait, then the fix will be released in a new patch of Yarn >
This is basically the same stack trace as I posted in #9013 (comment). You then have warnings concerning @ava/babel which you would need to research in their repo. The same for the other similar warnings.
This error from @ava/typescript says that it is not compatible with Node.js |
This comment was marked as duplicate.
This comment was marked as duplicate.
The last update is from last week. See #9013 (comment) |
The issue is also reproducible if Yarn Classic is used to set the version to Yarn Modern: nvm use 21
corepack disable
npm install yarn -g
yarn set version stable
|
This comment was marked as off-topic.
This comment was marked as off-topic.
If you want to register that you are also interested in a resolution for this issue, I suggest you "up-vote" it by clicking on the 👍🏻 icon in the original post #9013 (comment) instead of adding a separate new comment: |
You wrote in #9013 (comment) back in January that the issue was fixed and not yet released. Can you share any planning date for a potential release? |
I don't honestly know. It's not up to me, and Yarn Classic is deprecated in favor of Berry, and is currently only getting high priority updates. I understand that it's not possible in all cases but I highly recommend migrating if you are able. I'll try to bump this again but I can't guarantee anything. |
Many thanks for your attention to this! I do appreciate that Yarn Classic is deprecated and in terms of using Yarn Classic as a standalone item I would understand if this issue were designated as "won't fix". I would be more concerned about the use of Yarn Classic in order to set up Yarn Berry (Modern) which provokes the https://yarnpkg.com/getting-started/install says
This is however slightly problematic as Node.js Corepack documentation classifies Corepack with Stability: 1 Experimental and the Node.js documentation says "Use of the feature is not recommended in production environments." So the choice is between the devil and the deep-blue sea in Node.js
|
I'm writing with some solana spl token, and faced this issue,too.
|
Did you run your command using the |
It did not show any modules that cause the warning |
@JhiNResH same here. Still getting the error on 21.6.2 |
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.
Fixed with the 1.22.22:
|
What is the easiest way to test this fix? |
@arcanis Testing according to the original repro steps confirms the fix is working as needed: 🎉 Repro stepsConfirm that Node.js 21.x is installed / active
Install previous version of Yarn (
Install latest version of Yarn (
|
Also confirmed fixed for Repro stepsConfirm that Node.js 21.x is installed / active
Install previous version of Yarn (
Install latest version of Yarn (
|
See my previous comments #9013 (comment) and #9013 (comment) That does not cover all possible scenarios, however I'm confident that the issue has been fixed now as far as core Yarn is concerned. |
@MikeMcC399 Thanks for the steps to reproduce. I followed these steps, but still getting a punycode DeprecationWarning message.
|
The most likely reason that you are still getting a punycode deprecation message is that it is coming from a package which is not Yarn. Have you set the environment variable |
I use Then I ran building Here is the result:
|
that's not yarn, that's node-fetch bundled within Next |
You're right. I've checked But I still got the warning even with However, this upgrade fixed it.
|
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.
Going to be locking this issue because of the influx of comments that are not caused by Yarn. If anyone is able to reproduce this bug as a direct result of Yarn (using |
punycode
module is deprecated" with Node.js 21.x #9005 (re-opened as new issue, since a new version of Yarn is involved)Description
provokes a deprecation warning under Node.js current version
21.x
.Versions
v21.2.0v21.6.2Steps to reproduce
With Node.js
v21.2.0v21.6.2 installed, execute:shows
Further debug information is output by:
NODE_OPTIONS='--trace-deprecation' yarn info yarn description
The text was updated successfully, but these errors were encountered: