【发布时间】:2025-12-31 22:55:01
【问题描述】:
我发现了 Github repo 中包含的用于连接 Heroku 服务器的文件,并替换为我自己的 package.json、flow .json、repo 链接在 app.json 中。部署后,我尝试打开应用程序并从 Heroku CLI 的日志窗口收到如下错误:
2021-04-13T10:22:01.693823+00:00 heroku[web.1]: Starting process with command `node --max-old-space-size=384 node_modules/node-red/red.js --settings ./settings.js --userDir ./`
2021-04-13T10:22:05.304911+00:00 heroku[web.1]: Process exited with status 1
2021-04-13T10:22:05.411606+00:00 heroku[web.1]: State changed from starting to crashed
2021-04-13T10:22:05.185490+00:00 app[web.1]: throw err;
2021-04-13T10:22:05.185491+00:00 app[web.1]: ^
2021-04-13T10:22:05.185491+00:00 app[web.1]:
2021-04-13T10:22:05.185492+00:00 app[web.1]: Error: Cannot find
module '/app/node_modules/node-red/red.js'
2021-04-13T10:22:05.185492+00:00 app[web.1]: at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:880:15)
2021-04-13T10:22:05.185492+00:00 app[web.1]: at
Function.Module._load (internal/modules/cjs/loader.js:725:27)
2021-04-13T10:22:05.185493+00:00 app[web.1]: at
Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)
2021-04-13T10:22:05.185494+00:00 app[web.1]: at
internal/main/run_main_module.js:17:47 {
2021-04-13T10:22:05.185494+00:00 app[web.1]: code:
'MODULE_NOT_FOUND',
2021-04-13T10:22:05.185495+00:00 app[web.1]: requireStack: []
2021-04-13T10:22:05.185495+00:00 app[web.1]: }
My Github repo link 希望能得到您的帮助。谢谢。
【问题讨论】: