首页 > 解决方案 > 执行我的文件时出现的这个错误是什么?

问题描述

有什么问题 ???在 VS 代码中执行我的文件时,我正在使用 JavaScript 开发一个不和谐的机器人,它可以正常工作,但在 Repl.it 中它向我显示了这个错误

 internal/fs/utils.js:269
        throw err;
        ^
    
    Error: ENOENT: no such file or directory, open '/home/runner/Bot/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] (internal/modules/run_main.js:60:12)
        at internal/main/run_main_module.js:17:47 {
      errno: -2,
      syscall: 'open',
      code: 'ENOENT',
      path: '/home/runner/Bot/index.js'
    }

标签: javascriptnode.jsdiscorddiscord.js

解决方案


推荐阅读