我正在尝试从 github 在 Heroku 上部署一个应用程序。构建成功并进行了部署,但我得到了这个:
Application error. An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details
我已经尝试了我在网上找到的所有内容,但似乎没有任何效果。可能有什么问题?我的应用程序是 ASP NET Core-Angular-Postgre,我使用的包是:heroku/nodejs 和 https://github.com/jincod/dotnetcore-buildpack。这是错误日志:
2021-06-08T10:26:50.000000+00:00 app[api]: Build succeeded
2021-06-08T10:38:09.898983+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=bucuriesicredinta.herokuapp.com request_id=bcb5093b-6b3c-4713-bf35-11d2c087b574 fwd="109.103.246.72" dyno= connect= service= status=503 bytes= protocol=https
2021-06-08T10:38:10.307972+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=bucuriesicredinta.herokuapp.com request_id=c9df055e-341c-4676-962b-6fb4c9e90c5d fwd="109.103.246.72" dyno= connect= service= status=503 bytes= protocol=https 2021-06-08T10:38:10.740207+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=bucuriesicredinta.herokuapp.com request_id=4c639bfb-304c-4f60-a814-26b973afd0eb fwd="109.103.246.72" dyno= connect= service= status=503 bytes= protocol=https
我读过以 H 开头的错误是由 Procfile 引起的,但我似乎找不到。它应该在我的根文件夹中吗?它应该包含什么? 另外,这是我的 package.json,我不知道我是否应该在“脚本”中写一些东西,它是这样自动制作的:
{
"name": "joyandfaith",
"version": "1.0.0",
"description": "",
"engines": {
"node": "14.16.1"
},
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/[my_username]"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/[my_username]"
},
"homepage": "https://github.com/[my_username]"
}
我的想法不多了。任何建议都会有所帮助!