为什么我的Heroku部署无法识别我的Procfile? [英] Why is my Heroku deployment not recognising my Procfile?

查看:134
本文介绍了为什么我的Heroku部署无法识别我的Procfile?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy my app using Heroku.

我尝试通过CLI进行尝试,并在其用户门户中以图形方式进行尝试.

I tried via CLI and also graphically in their user portal.

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

I get this problem in the build log:

 Procfile declares types -> (none)

它不是在读取我的Procfile.

It's not reading my 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

这不是文本文件.

这是我编辑的目录.我已解决的步骤:

Here is my edited directory. Steps I've done to resolve:

  1. 重构名称

  1. Refactored the name

在本地运行

git push heroku master

git push heroku master

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

I've also deleted the other copy of the Procfile as i thought it may be causing conflicts. 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 :(

这也是我更新的日志:

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

根据另一篇文章的建议,我尝试了以下操作

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. Note that I have now tried them both. See below screenshots:

[

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

Forgot to add the -a switch on Danslist but still got an error. See screenshot:

推荐答案

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

Your directory name contains a space in Profile which is causing errors change your project name.

更新#2: https://devcenter.heroku.com/articles/错误代码#h14-no-web-dynos-正在运行

这很可能是将您的Web dynos缩放到0 dynos的结果.要解决此问题,请将您的网络测功机缩放到1个或多个测功机:

This is most likely the result of scaling your web dynos down to 0 dynos. To fix it, scale your web dynos to 1 or more dynos:

heroku ps:scale web=1,如果这要求一个应用程序,请尝试运行此程序.

heroku ps:scale web=1, if this asks for an app try running this.

heroku ps:scale web=1 -a your_heroku_appname

这篇关于为什么我的Heroku部署无法识别我的Procfile?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆