-
Notifications
You must be signed in to change notification settings - Fork 78
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 Salesforce CLI outputs "DeprecationWarning: The punycode
module is deprecated." after every sf
command.
#2535
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This issue has been linked to a new work item: W-14355613 |
Hi @catalandres , we noticed this too a few days ago and tracked it down to 1 dep (
for node-fetch there's a PR to bump it but were waiting to get the jsforce test pipeline stable (node-fetch v3 is an ESM package, we'll have to do more changes probably): jsforce/jsforce#1356 for octokit deps we shared this with the IDEx team (they own templates), no ETA yet. If you are using |
This question is bothering me. I searched the internet but couldn't find an answer |
downgrade node to 20.9.0 version |
this work👌 |
@RoboProgrammer69 @AmrMohamed001 are you all downgrading to node 20 because of the warning or are you getting an install error on v21? |
Yes as this is unknown warning |
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 |
@maion308 this warning doesn't break any CLI functionality (if you are parsing CLI output you should always use stdout), why are you swapping the core |
@cristiand391 He's following the instructions provided by the readme for punycode.
|
please note that this is repo is for Salesforce CLI issues, I think some people is getting here when googling for that warning. |
works like a charm! |
I have de issue I run: `$ biome format --write ./src (node:30521) [DEP0040] DeprecationWarning: The Does anyone know how to solve it? |
How did you access the directory tr46? all I see in node_modules is the 'punnycode' folder and the package-lock JSON file. |
punycode
module is deprecated.punycode
module is deprecated." after every sf
command.
@cristiand391 Sadly, this thread is getting polluted with comments that are relevant to other projects. I have renamed the issue to make it clear that this is relevant to our tool. For what it's worth, there is a reasonable temporary solution to this — use |
Locking this issue for a bit, if this warning is affecting scripts parsing Salesforce CLI output see this comment: |
Or use The PS. You can set this flag using the |
So is there an official fix coming for this or is there nothing |
@tggagne yes, we have 2 possible workarounds for this before node v22 gets promoted to LTS. |
The warning is back :'( |
Does this have to do with having included Node v22 LTS in the binary packages starting this week? |
Yes ^^ |
I'm seeing this warning too, and it's preventing me from authorizing my org, so I can't retrieve or push any code. I have a fresh Windows install on my work laptop as of 2 weeks ago, but only just got admin permissions so I can install what I need for my developer environment. I'm running the following versions: Do we know when a fix for this will be in place @cristiand391? I have run through the various fixes suggested in this thread and on #3111 to no avail. |
@catmac42 as workaround, you can downgrade NodeJS to 20.x :) |
@catmac42 if you installed SF Cli using windows installer, uninstall it, then reinstall it again with |
@nvuillam For mac, is there a way to get rid of it? or downgrade?. I started experiencing this issue after I wanted to try out the sfdx-hardis extension. |
Use Homebrew: `brew install sf`.
It takes care of getting the right version of Node.
…________________________________
From: Krishnamurthy ***@***.***>
Sent: Wednesday, November 20, 2024 11:50:16 PM
To: forcedotcom/cli ***@***.***>
Cc: Andrés Catalán ***@***.***>; Mention ***@***.***>
Subject: Re: [forcedotcom/cli] The Salesforce CLI outputs "DeprecationWarning: The `punycode` module is deprecated." after every `sf` command. (Issue #2535)
@nvuillam<https://github.com/nvuillam> For mac, is there a way to get rid of it? or downgrade?
—
Reply to this email directly, view it on GitHub<#2535 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMSTDLOLIM7J7H4WOSMJO32BVRARAVCNFSM6AAAAABP2P6EYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJQGA3TGNBSGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Like @catalandres says 😊 |
As @cristiand391 suggested in the other dupe discussion
The message also appears for node LTS 22.x. Since I ended up here: Does a patch have a timeline/dependencies? |
this issue has been addressed in 2.69.14 (December 11, 2024). Thx! |
Summary
Running the
sf
CLI undernode
v21.0.0 throws out the following warning:Steps To Reproduce
node
to v21.sf
command. For example,sf --version
.Expected result
Actual result
System Information
Additional information
Apparently,
punycode
has been deprecated starting withnode
v21.The text was updated successfully, but these errors were encountered: