$ git push heroku master
Counting objects: 255, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (226/226), done.
Writing objects: 100% (255/255), 46.83 KiB | 0 bytes/s, done.
Total 255 (delta 110), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://github.com/heroku/heroku-buildpack-php
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to xxxxxxxxxxxxxxxxx.
remote:
To https://git.heroku.com/xxxxxxxxxxxxxx.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxxxxxxxxxx.git'
確認する事
- composer.lock がpush 対象になっているか
- なぜかignore global でcomposer.lockを含めていた(過去追加したので経緯は覚えてない)
- ignore 対象のファイルの場合は git add -f xxx
- composer.json が存在するか
- buildpack がheroku/php と指定されているか
- Laravel のroot にはpackage.json が存在しNodeと勘違いが発生するらしい(明示的にPHPとする必要あり)
- heroku laravel のドキュメントを読む
試した事
- 上記を試したが改善せず
- 結局は、git init -> heroku create -> git push heroku master を行い、git remote add でGithubを追加し、Githubのリポジトリをmergeして回避
- remote が複数ある事が原因ではない事は確認済だが、git init -> heroku create の順に実行する必要があるのか原因は不明
利用したコマンド
- heroku config -- 設定状況を確認
- heroku buildpacks -- buildpackが何か確認