“Procfile 声明类型 ->"的原因是什么?(无)"在 Heroku 中? [英] What is the reason for "Procfile declares types -> (none)" in Heroku?

查看:25
本文介绍了“Procfile 声明类型 ->"的原因是什么?(无)"在 Heroku 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将测试应用程序部署到 Heroku --stack cedar,但每次我执行 Procfile 时都会被忽略.

I am trying to deploy a test app to Heroku --stack cedar but every time I do my Procfile is being ignored.

应该是这样的:

Procfile declares types -> web

但是这样说

Procfile declares types -> (none)

由于这个问题,当我浏览 URL 时,它当然不会加载到 heroku 平台上.

Because of this problem it of course won't load on the heroku platform when I navigate the URL.

除了这个测试 (A) 我在另一个文件夹中有一个相同的项目 (B),它确实有效.我很困惑为什么 (A) 没有,所以我现在来这里问.

Aside from this test (A) I have an IDENTICAL project (B) in another folder which DOES work. I am so utterly confused as to why (A) doesn't that I'm coming here to ask now.

我尝试过的其他一些事情 (A) 包括:

A couple other things I've tried with (A) include:

  • 重新创建 heroku 应用
  • 重新创建 git 存储库(即删除 .git、git init...)
  • 清除项目文件夹中的文件,并从另一个有效的副本中复制文件

如果我制作 (B) 的顶级文件夹副本,那么该副本将起作用.问题似乎是将文件/文件夹从 (B) 等复制到 (A) 中,这是被诅咒的.

If I make top-level folder copy of (B) then that copy will work. The issue seems to be copying files/folders from within (B) et al to within (A), the cursed one.

所以,到目前为止,我只能确定一切正常,减去这个 (A) 被诅咒的文件夹.我很想找出原因,而不必得出巫术结论.

So, so far all I can determine is everything is working minus this (A) cursed folder. I would love to find out why instead of having to come to a witch-craft conclusion.

推荐答案

我遇到了同样的问题,现在我才发现哪里出了问题.我第一次不小心调用了文件 ProcFile 而不是 Procfile.git 不会简单地重命名该文件.我必须先做一个 git rm ProcFile -f 然后添加一个新的(正确命名的)Procfile.之后,它被 git 正确推送并被 Heroku 正确接收.

I had the same problem and I just now I found what was wrong. I first accidently called the file ProcFile instead of Procfile. Simply renaming that file did not get picked up by git. I had to do a git rm ProcFile -f first and then add a new (correctly named) Procfile. After that, it got pushed correctly by git and got picked up correctly by Heroku.

这篇关于“Procfile 声明类型 ->"的原因是什么?(无)"在 Heroku 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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