how do i fix
Exception has occurred: TypeError: Cannot read properties of undefined (reading 'name')
at Object.<anonymous> (C:\Users\jacks\OneDrive\Desktop\discord\index.js:14:36)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
8 Replies
- 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 staffWhatever you call name on is undefined
client.commands.set(command.data.name, command);
how do i fix
a cll the file muisc
.js
@wolvinny 🌈
one of your commands does not export a data property
how do i fix
by making your export a data property
how
Basic js, #rules 3 #resources