简体   繁体   English

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

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

I'm trying to deploy my app using Heroku.我正在尝试使用 Heroku 部署我的应用程序。

I tried via CLI and also graphically in their user portal.我通过 CLI 尝试过,也在他们的用户门户中以图形方式尝试过。

I get this problem in the build log:我在构建日志中遇到了这个问题:

 Procfile declares types -> (none)

It's not reading my Procfile.它没有读取我的 Procfile。

Here's some of the latest lines of my error logs:这是我的错误日志的一些最新行:

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

It's not a text file.它不是文本文件。

Here is my edited directory.这是我编辑的目录。 Steps I've done to resolve:我为解决而采取的步骤:

  1. Refactored the name重构了名称

  2. Ran it locally在本地运行

  3. git push heroku master git推heroku主控

I've also deleted the other copy of the Procfile as i thought it may be causing conflicts.我还删除了 Procfile 的另一个副本,因为我认为它可能会导致冲突。 I do think it has something to do with my directories.我确实认为这与我的目录有关。 I did get quite confused with the directories in the tutorial because i stupidly personally named them:(我确实对教程中的目录感到很困惑,因为我愚蠢地亲自命名了它们:(

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

Also here is my updated logs:这也是我更新的日志:

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

EDIT 2:编辑2:

As suggested in another post I tried the following正如另一篇文章中所建议的,我尝试了以下方法

heroku ps:scale web=1 -a Danslist_Project

Then I thought I'd try other names too as I think i'm confused with the names and directories.然后我想我也会尝试其他名称,因为我认为我对名称和目录感到困惑。

尝试了不同的名字

EDIT 3: Ok, so I took a look at that site and noticed I had two apps here.编辑 3:好的,所以我查看了那个网站,发现我这里有两个应用程序。 Note that I have now tried them both.请注意,我现在已经尝试了它们。 See below screenshots:请看下面的截图:

我的两个应用

[ [错误描述[3]

EDIT 4:编辑4:

Forgot to add the -a switch on Danslist but still got an error.忘记在 Danslist 上添加 -a 开关,但仍然出现错误。 See screenshot:看截图:

在此处输入图像描述

Your directory name contains a space in Profile which is causing errors change your project name.您的目录名称在 Profile 中包含一个空格,这会导致错误更改您的项目名称。

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

This is most likely the result of scaling your web dynos down to 0 dynos.这很可能是将您的 web dynos 缩小到 0 dynos 的结果。 To fix it, scale your web dynos to 1 or more dynos:要修复它,请将您的 web 测功机缩放到 1 个或多个测功机:

heroku ps:scale web=1 , if this asks for an app try running this. 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