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 toolkit6mo 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
Syjalo6mo ago
Neither discord.js does. Use npm ls punycode to find it
nick403
nick4036mo ago
1s discord_temp_vcs@1.0.2 C:\Users\Silag\OneDrive\Desktop\Bot\Discord-TempVoice-Bot-master `-- punycode@2.3.1 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
Syjalo6mo ago
The trace says whatwg-url is using punycode
nick403
nick4036mo 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/luna6mo ago
well, as syalo said, its coming from whatwg-url So this is not a djs issue
nick403
nick4036mo ago
but i don't use it in my code so... is a way to patch it ?
chewie 🌈
chewie 🌈6mo ago
if you dont use it, remove shrug
nick403
nick4036mo ago
see here ? i don't require it so like
treble/luna
treble/luna6mo ago
yeah but you have the module installed so remove it
nick403
nick4036mo ago
npm uninstall?
treble/luna
treble/luna6mo ago
yes
nick403
nick4036mo ago
thanks
nick403
nick4036mo ago
that is what it sould do ?
No description
Skylife
Skylife6mo ago
yea i had the same problem just upgrad to latest d.js version
treble/luna
treble/luna6mo ago
this has nothing to do with djs though
Skylife
Skylife6mo ago
downgrade to 14.11.0 and u will see it gets installed
treble/luna
treble/luna6mo ago
djs does not use punycode nor is this related to any of their issues as the issue comes from another package