繁体   English   中英

为什么我的 Heroku 部署无法识别我的 Procfile?

[英]Why is my Heroku deployment not recognising my Procfile?

我正在尝试使用 Heroku 部署我的应用程序。

我通过 CLI 尝试过,也在他们的用户门户中以图形方式尝试过。

我在构建日志中遇到了这个问题:

 Procfile declares types -> (none)

它没有读取我的 Procfile。

这是我的错误日志的一些最新行:

2020-05-08T04:32:57.546072+00:00 app[api]: Deploy 02e1e06c by user djrgrey@gmail.com
2020-05-08T04:32:57.546072+00:00 app[api]: Release v7 created by user djrgrey@gmail.com
2020-05-08T04:33:05.475821+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=herokudanslist.herokuapp.com request_id=ff88cf27-54c2
-4611-b611-ce36c41b09f6 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-08T04:33:06.086210+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=herokudanslist.herokuapp.com request_id=a4
690f93-c8e3-4256-b46b-a8d1e69109c1 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-08T04:33:13.000000+00:00 app[api]: Build succeeded
2020-05-08T10:04:32.000000+00:00 app[api]: Build started by user djrgrey@gmail.com
2020-05-08T10:05:04.414084+00:00 app[api]: Release v8 created by user djrgrey@gmail.com
2020-05-08T10:05:04.414084+00:00 app[api]: Deploy 92e0c7b1 by user djrgrey@gmail.com
2020-05-08T10:05:37.245718+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=herokudanslist.herokuapp.com request_id=9cb80bd2-7cb6
-4e20-ad8a-e61aeeab0e02 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-08T10:05:39.210072+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=herokudanslist.herokuapp.com request_id=a2
9bf337-c13a-4eb7-83ef-e221bc69b6b7 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-08T10:05:40.000000+00:00 app[api]: Build succeeded

它不是文本文件。

这是我编辑的目录。 我为解决而采取的步骤:

  1. 重构了名称

  2. 在本地运行

  3. git推heroku主控

我还删除了 Procfile 的另一个副本,因为我认为它可能会导致冲突。 我确实认为这与我的目录有关。 我确实对教程中的目录感到很困惑,因为我愚蠢地亲自命名了它们:(

这是我的更改要求的屏幕截图

这也是我更新的日志:

2020-05-10T12:45:29.755415+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=herokudanslist.herokuapp.com request_id=e0
4a8cbd-ea93-408d-bc4a-02c712aac84d fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-11T00:40:58.769115+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=herokudanslist.herokuapp.com request_id=dd461869-8299
-4eab-888c-c5ad06b13a22 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https
2020-05-11T00:40:59.344106+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=herokudanslist.herokuapp.com request_id=1c
21d6da-9b1b-4246-acc6-11e4648ec474 fwd="118.149.66.76" dyno= connect= service= status=503 bytes= protocol=https

编辑2:

正如另一篇文章中所建议的,我尝试了以下方法

heroku ps:scale web=1 -a Danslist_Project

然后我想我也会尝试其他名称,因为我认为我对名称和目录感到困惑。

尝试了不同的名字

编辑 3:好的,所以我查看了那个网站,发现我这里有两个应用程序。 请注意,我现在已经尝试了它们。 请看下面的截图:

我的两个应用

[错误描述[3]

编辑4:

忘记在 Danslist 上添加 -a 开关,但仍然出现错误。 看截图:

在此处输入图像描述

您的目录名称在 Profile 中包含一个空格,这会导致错误更改您的项目名称。

更新#2: https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running

这很可能是将您的 web dynos 缩小到 0 dynos 的结果。 要修复它,请将您的 web 测功机缩放到 1 个或多个测功机:

heroku ps:scale web=1 ,如果这要求应用程序尝试运行它。

heroku ps:scale web=1 -a your_heroku_appname

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM