Heroku Procfile 声明类型 -> (none)

Heroku Procfile declares types -> (none)

我已经将名称正确更改为大写 P 的 Procfile,但问题仍然存在。

这是 Heroku 在终端中所说的:

这是我的项目:

这是 Procfile 中的代码:

web: gunicorn app_with_handler.py:app --log-file -

我是不是漏掉了什么或者下一步应该尝试什么?

更新:通过删除Procfile,提交并推送到heroku来解决问题。然后再次创建完全相同的 Procfile,再次提交并推送到 heroku。这种方式似乎对我有用。

如果您没有推送 Procfile 并更改您的git 存储库,就会发生这种情况。

在使用“git push heroku main”命令在 Heroku 上部署带有 chages 的应用程序之前,您应该首先将更改推送到 git 存储库,如 Win Wongsawatdichart 所述。