【发布时间】:2021-10-20 20:29:41
【问题描述】:
我一直在使用 node.js 在 replit 中编写一个机器人,当我尝试运行它时,我得到了这个错误:
internal/fs/utils.js:269
throw err;
Error: ENOENT: no such file or directory, open '/home/runner/musicjs/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/musicjs/index.js'
}
任何想法为什么它给我这个错误?
感谢您的帮助!
【问题讨论】:
-
那么你的文件系统是什么样的?
-
您能否添加一些屏幕截图,以便我们查看您要查找的文件位于何处以及您正在运行的脚本位于何处?