Skip to content
← Back to Community
meu projeto esta dando um erro
Profile icon
cirocaue

I'm trying to make a bot that plays music on the discord, when I start this error (repl process died unexpectedly)
Can someone help me? I'm not managing to fix

Answered by 19wintersp [earned 5 cycles]
View Answer
Voters
Profile icon
caduoliveira
Profile icon
dnl777
Profile icon
cirocaue
Comments
hotnewtop
Profile icon
19wintersp

Replit expects the main file to be called "index.js", you've called it "musicBot.js". Either rename it, or create a file called ".replit" and add this:

run = "node musicBot.js"
Profile icon
cirocaue
Profile icon
Coder100

ez

create a .replit file and add this:

run = "node musicBot"

the error is that you must have the file be called index.js as the entry point or you can just configure the run button.

Profile icon
Coder100

That is the least important part of the error, is there *anything else you have?

Anayways, replit doesn't have the best support for music bots yet.

Profile icon
19wintersp

@Coder100 From the repl logs:

internal/fs/utils.js:269 throw err; ^ Error: ENOENT: no such file or directory, open '/home/runner/DJ-LEVi/index.js' at Object.openSync (fs.js:462:3) at Object.readFileSync (fs.js:364:35) at Object.<anonymous> (/run_dir/interp.js:195:19) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/runner/DJ-LEVi/index.js' }
Profile icon
Coder100