【发布时间】:2018-02-16 23:11:19
【问题描述】:
当我运行git push heroku master 时,我得到了:
C:\Users\Emanuele-PC\Desktop\project-mm-beta>git push heroku master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 505 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to project-mm-beta.
remote:
To https://git.heroku.com/project-mm-beta.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project-mm-beta.git'
我尝试部署的代码只是一个文件(这是一个测试,因为这是我第一次使用 Heroku),它是用 Python 编写的。我已经设置了 buildpack (python),但它仍然不起作用。我该如何解决?
【问题讨论】:
-
您需要包含一个
requirements.txt文件。它可以是空的。 devcenter.heroku.com/articles/python-runtimes#activation-1 -
我做到了,但我仍然收到该错误。
-
如果您运行
heroku logs,是否会显示任何其他错误 -
只有这种错误:
2017-09-08T06:18:27.000000+00:00 app[api]: Build failed -- check your build logs在不同时间重复(只有这种错误,没有其他错误)。但我认为这与“App 与 buildpack 不兼容”有关。 -
也许添加一个像stackoverflow.com/a/44854965/6085135这样的Procfile
标签: heroku