我目前正在尝试将我的网站上传到Heroku并上传很好,但在尝试访问该网站时遇到了应用程序错误。此外,当使用heroku或节点在本地运行站点时,它没有问题。这是我的Heroku日志。
2018-03-14T00:40:58.059502+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=kyleshrote.herokuapp.com
request_id=0b3db092-64b3-412e-8f3d-7626e5805760 fwd="199.87.224.132" dyno=
connect= service= status=503 bytes= protocol=https
2018-03-14T00:41:00.847606+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=kyleshrote.herokuapp.com
request_id=11ea8eb7-8927-40c0-8830-3927443e57d6 fwd="199.87.224.132" dyno=
connect= service= status=503 bytes= protocol=https
2018-03-14T01:32:56.825817+00:00 heroku[web.1]: Starting process with
command `node server.js`
2018-03-14T01:32:58.882839+00:00 app[web.1]: module.js:540
2018-03-14T01:32:58.882858+00:00 app[web.1]: throw err;
2018-03-14T01:32:58.882860+00:00 app[web.1]: ^
2018-03-14T01:32:58.882862+00:00 app[web.1]:
2018-03-14T01:32:58.882864+00:00 app[web.1]: Error: Cannot find module
'../models/Project.js'
2018-03-14T01:32:58.882865+00:00 app[web.1]: at
Function.Module._resolveFilename (module.js:538:15)
2018-03-14T01:32:58.882867+00:00 app[web.1]: at Function.Module._load
(module.js:468:25)
2018-03-14T01:32:58.882868+00:00 app[web.1]: at Module.require
(module.js:587:17)
2018-03-14T01:32:58.882870+00:00 app[web.1]: at require
(internal/module.js:11:18)
2018-03-14T01:32:58.882872+00:00 app[web.1]: at Object.<anonymous>
(/app/controllers/projectController.js:5:17)
2018-03-14T01:32:58.882873+00:00 app[web.1]: at Module._compile
(module.js:643:30)
2018-03-14T01:32:58.882875+00:00 app[web.1]: at
Object.Module._extensions..js (module.js:654:10)
2018-03-14T01:32:58.882878+00:00 app[web.1]: at tryModuleLoad
(module.js:499:12)
2018-03-14T01:32:58.882876+00:00 app[web.1]: at Module.load
(module.js:556:32)
2018-03-14T01:32:58.882879+00:00 app[web.1]: at Function.Module._load
(module.js:491:3)
2018-03-14T01:32:58.959966+00:00 heroku[web.1]: State changed from starting
to crashed
2018-03-14T01:32:58.949469+00:00 heroku[web.1]: Process exited with status 1