BOT PROBLEM

I was going to create my bot by watching a video, that is, I was going to set up the bot, but I saw that video and did everything. Node did it first, but it didn't work for me. When I type node index.js, it crashes. When I use nodemon, I get this error:
[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node index.js`
node:internal/modules/cjs/loader:1247
throw err;
^

Error: Cannot find module 'C:\Users\kadir6848\OneDrive\Desktop\N.E.X.U.S\index.js'
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v22.13.1
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node index.js`
node:internal/modules/cjs/loader:1247
throw err;
^

Error: Cannot find module 'C:\Users\kadir6848\OneDrive\Desktop\N.E.X.U.S\index.js'
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v22.13.1
[nodemon] app crashed - waiting for file changes before starting...
It works with index.js. Also, when the bot is opened, it should write a message to the terminal and the message seen in a chat should be written to the terminal. I made the code from the video and it didn't work. I didn't make any mistakes. Everything is correct. Please help me to develop my bot properly:(
16 Replies
d.js toolkit
d.js toolkit2mo ago
Inky
Inky2mo ago
There is no index.js file in the ~/Desktop/N.E.X.U.S folder
MaxTechnics
MaxTechnics2mo ago
It could also be because your desktop is synced with onedrive. Had plenty of issues where onedrive would sync the files with onedrive and only keep the references local. If you are sure you have an index.js, try moving your project to a place that's not synced with onedrive
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2mo ago
That sounds like an entirely unrelated skill issue, please stay on topic
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Steve
Steve2mo ago
why is this staff so toxic sometimes 😭🙏 the second you say something that's not perfect they act like they're superior humans
monbrey
monbrey2mo ago
That's also well off topic
Steve
Steve2mo ago
and true 😔😔
riot
riot2mo ago
LOL ur tuff
Steve
Steve2mo ago
😭🙏 blud timed me out - aura
WiiZARDD
WiiZARDD2mo ago
This. @Mr.Omega - Also consider removing the periods from your dir name like (T.H.I.S) so it's (THIS) instead.
Mr.Omega
Mr.OmegaOP2mo ago
No index.js in NEXUS file I checked a thousand times It was in the node module file oh i guess that's the problem ohh ı will test
duck
duck2mo ago
though to elaborate, there will be many files named index.js throughout node_modules you'll want your own or to update the main in your package.json
Mr.Omega
Mr.OmegaOP2mo ago
There are still problems, I put that file in that file in vsc I will delete the file and ı will do it again
d.js toolkit
d.js toolkit2mo ago
The thread owner has marked this issue as solved.

Did you find this page helpful?