Syntax error

async execute(interaction) { ^^^^^ SyntaxError: Unexpected token 'async' at internalCompileFunction (node:internal/vm:77:18) at wrapSafe (node:internal/modules/cjs/loader:1288:20) at Module._compile (node:internal/modules/cjs/loader:1340:27) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 Node.js v20.10.0
4 Replies
d.js toolkit
d.js toolkit11mo 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
Fisch
FischOP11mo ago
Don't know why, even though I have node.js v20
AlexCdDg
AlexCdDg11mo ago
You have a syntax error in one of your files, it doesn't have to do anything with node version nor discord.js
treble/luna
treble/luna11mo ago
also just basic js in general
Want results from more Discord servers?
Add your server