-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
[v22.8.0] - DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
#54938
Comments
That deprecation warning just means that something is using punycode, which has been deprecated. |
Hi, @redyetidev It appears to be an issue with Node.js itself, right? As I observed the following: $ node -v
v23.0.0
$ pnpm ls --depth 10 | grep punycode | wc -l
0
$ node --trace-deprecation
Welcome to Node.js v23.0.0.
Type ".help" for more information.
> punycode
{
version: '2.1.0',
ucs2: { decode: [Function: ucs2decode], encode: [Function: ucs2encode] },
decode: [Function: decode],
encode: [Function: encode],
toASCII: [Function: toASCII],
toUnicode: [Function: toUnicode]
}
> (node:2756) [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:399:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
at loadBuiltinModule (node:internal/modules/helpers:112:7)
at Function._load (node:internal/modules/cjs/loader:1110:17)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Module.require (node:internal/modules/cjs/loader:1350:12)
at get (node:internal/modules/helpers:226:33)
at REPL1:1:1
> |
No, that's intentional. The |
Can there be any more support on this? Either just outright remove punycode from Node.js so library authors are forced to update to the userland alternative (or the The other alternative I have is globally disabling all node warnings which isn't ideal either. |
Agree this warning of this punycode is such a long long issue that plagued Node for many years is getting annoying. I wish there was a better way to handle this without bombarding CLI with these warnings |
For things where I can control the entrypoint, you can patch punycode requires away with module-alias, as described in this issue: mathiasbynens/punycode.js#137 But for cli tools like @salesforce/cli ? Apparently Node.js punycode has been deprecated since Node.js v7.0.0 in Oct 2016, Isn't it long overdue to actually be removed then? |
I see punycode warnings everywhere now. Everywhere. I now do things now like I'm sure this warning wasn't added on a whim. I'm not even saying it should be removed. I'm just saying these are the things I think about now. |
The next Node.js 22 release, should include #56632 which will limit warnings to only emit outside of node_modules. |
Version
v22.8.0
Platform
Subsystem
No response
What steps will reproduce the bug?
npm run dev or build
How often does it reproduce? Is there a required condition?
Every time i run this command
What is the expected behavior? Why is that the expected behavior?
Not to show message
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: