The punycode module is deprecated.

Even if i don't use punycode in my code i get this error:
(node:3180) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
(node:3180) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
18 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Syjalo
Syjalo12mo ago
Neither discord.js does. Use npm ls punycode to find it
nick403
nick403OP12mo ago
1s [email protected] C:\Users\Silag\OneDrive\Desktop\Bot\Discord-TempVoice-Bot-master `-- [email protected] but in src there is no punycode
Config Loaded prefix: -
(node:7756) [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:397:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:333:10)
at loadBuiltinModule (node:internal/modules/helpers:101:7)
at Module._load (node:internal/modules/cjs/loader:1001:17)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\Silag\OneDrive\Desktop\Bot\Discord-TempVoice-Bot-master\node_modules\whatwg-url\lib\url-state-machine.js:2:18)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Config Loaded prefix: -
(node:7756) [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:397:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:333:10)
at loadBuiltinModule (node:internal/modules/helpers:101:7)
at Module._load (node:internal/modules/cjs/loader:1001:17)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\Silag\OneDrive\Desktop\Bot\Discord-TempVoice-Bot-master\node_modules\whatwg-url\lib\url-state-machine.js:2:18)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Syjalo
Syjalo12mo ago
The trace says whatwg-url is using punycode
nick403
nick403OP12mo ago
const client = new Client({ intents: [ GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates] }) const { REST, RequestData } = require('@discordjs/rest'); const { Routes, ButtonStyle } = require('discord-api-types/v10'); neither that i have but when i do node my_script.js i get that error
treble/luna
treble/luna12mo ago
well, as syalo said, its coming from whatwg-url So this is not a djs issue
nick403
nick403OP12mo ago
but i don't use it in my code so... is a way to patch it ?
chewie
chewie12mo ago
if you dont use it, remove shrug
nick403
nick403OP12mo ago
see here ? i don't require it so like
treble/luna
treble/luna12mo ago
yeah but you have the module installed so remove it
nick403
nick403OP12mo ago
npm uninstall?
treble/luna
treble/luna12mo ago
yes
nick403
nick403OP12mo ago
thanks
nick403
nick403OP12mo ago
that is what it sould do ?
No description
Skylife
Skylife12mo ago
yea i had the same problem just upgrad to latest d.js version
treble/luna
treble/luna12mo ago
this has nothing to do with djs though
Skylife
Skylife12mo ago
downgrade to 14.11.0 and u will see it gets installed
treble/luna
treble/luna12mo ago
djs does not use punycode nor is this related to any of their issues as the issue comes from another package
Want results from more Discord servers?
Add your server