error

помогите (discord.js)
node:internal/modules/cjs/loader:1051
throw err;
^

Error: Cannot find module 'C:\Users\Gigabyte\client.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Module._load (node:internal/modules/cjs/loader:901:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.9.0
node:internal/modules/cjs/loader:1051
throw err;
^

Error: Cannot find module 'C:\Users\Gigabyte\client.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Module._load (node:internal/modules/cjs/loader:901:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.9.0
No description
11 Replies
d.js toolkit
d.js toolkit8mo 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!
unexploder
unexploder8mo ago
Node.js v20.9.0 I want to run my bot on js and it gives me an error. Although everything is as it should be, everything is painted as it is, everything is in folders and the bot token is also there. Please help
treble/luna
treble/luna8mo ago
this isnt really djs related, you just appear to not hace a client.js file in the directory
unexploder
unexploder8mo ago
it is there and the bot token is also there
treble/luna
treble/luna8mo ago
Your error disagrees though make sure you are in the correct directory
unexploder
unexploder8mo ago
still the same mistake
No description
treble/luna
treble/luna8mo ago
show your file structure
unexploder
unexploder8mo ago
where is the token located?
treble/luna
treble/luna8mo ago
how am i supposed to know? its your code, and you should know where you put your token
unexploder
unexploder8mo ago
You misunderstood me, I'm asking should I send you a file here where the token should be?
treble/luna
treble/luna8mo ago
no your file structure because your file is not in the directory you run the command in