Ask coding questions

← Back to all posts
Help!
mechzzzz

How i solve this?

internal/fs/utils.js:269
throw err;
^

Error: ENOENT: no such file or directory, open '/home/runner/AlexBot/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:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint as runMain
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/AlexBot/index.js'
}

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
mechzzzz
Comments
hotnewtop
Coder100

make sure you always have an index.js file

also next time when you solve something by yourself please, explain how you solved it so later people can learn and not be dismayed.

RYANTADIPARTHI

did you solve it?

mechzzzz

Oh, Sorry.

It was a silly mistake, I put all the files in a subfolder, so they weren't being found. So I just moved them out of the subfolder and it worked normally.

mechzzzz

i solved