提问人:ButteredCrisp 提问时间:10/19/2023 最后编辑:PhilButteredCrisp 更新时间:10/19/2023 访问量:41
{nodemon} 应用程序崩溃 - 在开始之前等待文件更改
{nodemon} app crashed - waiting for file changes before started
问:
第一次制作 discord 机器人,但似乎遇到了这个问题
PS C:\Users\dylan\OneDrive\Desktop\ButteredCrisp Inc\ButteredCrisp Bot> nodemon
[nodemon] 3.0.1
[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:1080
throw err;
^
Error: Cannot find module 'C:\Users\dylan\OneDrive\Desktop\ButteredCrisp Inc\ButteredCrisp Bot\index.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.18.2
[nodemon] app crashed - waiting for file changes before starting...
尝试重新安装节点,但仍然遇到相同的问题
答: 暂无答案
评论
index.js
nodemon
运行脚本文件。默认情况下,它会查找一个名为 run 的文件,但您似乎没有具有该名称的文件。您要运行什么脚本文件?index.js
nodemon