DiscordAPIError
I've recently begun programming using discord.js and when I try to deploy my commands I get this error:
"C:\Program Files\nodejs\node.exe" C:\Users\user\IdeaProjects\bot\src\deploy-commands.js
node:fs:1507
const result = binding.readdir(
^
Error: ENOTDIR: not a directory, scandir 'C:\Users\user\IdeaProjects\bot\src\commands\loop.command.js'
at Object.readdirSync (node:fs:1507:26)
at Object.<anonymous> (C:\Users\user\IdeaProjects\bot\src\deploy-commands.js:14:29)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
errno: -4052,
code: 'ENOTDIR',
syscall: 'scandir',
path: 'C:\\Users\\user\\IdeaProjects\\bot\\src\\commands\\loop.command.js'
Node.js v20.16.0
Process finished with exit code 1"C:\Program Files\nodejs\node.exe" C:\Users\user\IdeaProjects\bot\src\deploy-commands.js
node:fs:1507
const result = binding.readdir(
^
Error: ENOTDIR: not a directory, scandir 'C:\Users\user\IdeaProjects\bot\src\commands\loop.command.js'
at Object.readdirSync (node:fs:1507:26)
at Object.<anonymous> (C:\Users\user\IdeaProjects\bot\src\deploy-commands.js:14:29)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
errno: -4052,
code: 'ENOTDIR',
syscall: 'scandir',
path: 'C:\\Users\\user\\IdeaProjects\\bot\\src\\commands\\loop.command.js'
Node.js v20.16.0
Process finished with exit code 1