【问题标题】:Heroku shows 'Procfile declares types -> (none)' but I am declaring a web processHeroku 显示“Procfile 声明类型 ->(无)”,但我正在声明一个 Web 进程
【发布时间】:2020-10-04 10:32:44
【问题描述】:

我已经尝试了所有方法...重命名了 Procfile,将其移至根目录等。请看下面的图片。

这是我的 webapp 页面上显示的错误:

这显示在我的仪表板上,因为 Heroku 没有识别我的 Procfile:

这是 Procfile 所在的目录:

我在部署时看到了这个:

Procfile declares types -> (none)

这是我的 Procfile 的内容:

请帮帮我

【问题讨论】:

  • 欢迎来到 Stack Overflow。 Please don't post screenshots of text。它们无法被搜索或复制,并且可用性差。相反,将代码作为文本直接粘贴到您的问题中。如果选择它并单击{} 按钮或Ctrl+K,则代码块将缩进四个空格,这将导致其呈现为代码。

标签: django heroku deployment procfile application-error


【解决方案1】:

您是否看到 Windows 屏幕截图中的第三列,其中显示您的 Procfile 的“文本文档”?该文件实际上称为 Procfile.txt,而不是 Procfile

Windows 默认隐藏已知文件类型的文件扩展名,但在“查看”选项卡中隐藏you can turn them on。之后,将文件重命名为实际上被称为Procfile,提交,然后重新部署。

或者,如果您使用 Git bash,您可以在命令行上执行此操作:

git mv Procfile.txt Procfile
git commit -m "Fix Procfile name"

【讨论】:

  • “不工作”不是很有帮助。请阅读How to Ask。您还在 Windows 资源管理器中看到“文本文档”吗?您是否提交了新文件并使用新提交进行部署?如果你在根目录下运行git ls-files Procfile,它会返回什么?
猜你喜欢
  • 2021-05-24
  • 2012-07-17
  • 1970-01-01
  • 2013-08-06
  • 2011-09-14
  • 1970-01-01
  • 2012-08-31
  • 2013-06-01
  • 1970-01-01
相关资源
最近更新 更多