Heroku推被拒绝

Aak*_*kur 4 git heroku

我在将我的主分支推送到heroku时遇到问题.我使用以下命令:

git push heroku master
Run Code Online (Sandbox Code Playgroud)

我遇到的错误 -

Counting objects: 114, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (112/112), done.
Writing objects: 100% (114/114), 335.40 KiB | 0 bytes/s, done.
Total 114 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/php.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:

remote: !       Push rejected to skyconfapp.
remote:
To https://git.heroku.com/skyconfapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/skyconfapp.git'
Run Code Online (Sandbox Code Playgroud)

我甚至访问了Heroku的链接https://devcenter.heroku.com/articles/buildpacks#detection-failure 并试图实现他们提到的每一种方法,但似乎没有什么对我有用.

有人可以帮忙吗?

Vic*_*ira 8

刚发生在我身上然后我就搞定了

尝试清除buildpacks,再次添加它并添加/ commit/push到heroku

heroku buildpacks:clear
heroku buildpacks:set heroku/php
git add/commit/push heroku master
Run Code Online (Sandbox Code Playgroud)


Lem*_*eur 6

我遇到了同样的问题,但我通过requirements.txt此处提到的根目录中添加“ ”来解决

只有当应用程序在根目录中有 requirements.txt 或 Pipfile 时,Heroku 支持才会应用于应用程序。即使应用程序没有模块依赖项,它也应该包含一个空的 requirements.txt 或 Pipfile 来记录您的应用程序没有依赖项。