#my bot wont go online this is my first bot and im new

18 messages · Page 1 of 1 (latest)

wind crag
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

modern rock
#

node verison v18.13.0

#

my error

#
               ^
ReferenceError: eventsPath is not defined```
#

something about this is messed up heres the code thanks

#
  .readdirSync(eventsPath)
  .filter((file) => file.endswith(".js"));```
jade bay
#

you have a typo

#

Line 22

#

it's eventspath instead of eventsPath

modern rock
#

ohhhhh

#

im sooo sloww god damnn

#

why am i the only one to get these errors

#
node:internal/fs/utils:348
    throw err;
    ^

Error: ENOENT: no such file or directory, scandir 'C:\Users\Ebk Wok\Desktop\scary\events'
    at Object.readdirSync (node:fs:1451:3)
    at Object.<anonymous> (C:\Users\Ebk Wok\Desktop\scary\index.js:24:4)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -4058,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'C:\\Users\\Ebk Wok\\Desktop\\scary\\events'
}

Node.js v18.13.0
PS C:\Users\Ebk Wok\Desktop\scary>```
jade bay
#

You don’t have events folder

modern rock
#

i do?

#

oh it had one wrong letter

#

i need to stop typing so fast lol