質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

Q&A

解決済

1回答

1035閲覧

herokuでデプロイ中、pushするとエラーが吐かれる。

meruchaaan

総合スコア18

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

0グッド

0クリップ

投稿2021/02/04 10:20

現在こちらのサイトを参考にherokuでデプロイを行っております。環境設定などが終わり、いざgit push heroku masterこのコマンドでpushを行うと下記のようなエラーメッセージが吐かれます。

remote: Compressing source files... done.

remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> PHP app detected
remote:
remote: ! ERROR: Basic validation for 'composer.json' failed!
remote: !
remote: ! It must be a valid JSON document compatible with Composer.
remote: !
remote: ! You most likely created or edited the file by hand, and it now
remote: ! contains a syntax error. Please refer to the documentation at
remote: ! https://getcomposer.org/doc/ for information on the format.
remote: !
remote: ! You can run 'composer validate' locally on your computer for
remote: ! further diagnosis. Remember to also always keep your lock file
remote: ! up to date with any changes according to the instructions at
remote: ! https://getcomposer.org/doc/01-basic-usage.md
remote:
remote: ! Push rejected, failed to compile PHP app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: dc44b8d11d86802a1f6dca2a9d7be45590937441
remote: !
remote: ! We have detected that you have triggered a build from source code with version dc44b8d11d86802a1f6dca2a9d7be45590937441
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to peaceful-savannah-45671.
remote:
To https://git.heroku.com/peaceful-savannah-45671.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/peaceful-savannah-45671.git'

日本語に直すと、jsonファイルに何か記述ミスをしているような感じだと思い、エラーメッセージを検索すると保存先にミスがあるような記述があり、確認しましたが何がミスで
今現在私はどこをミスしているのか全く分からない状態です。
もしよろしければご回答お願い致します。

もし追記の要望があれば直ちに訂正いたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

メッセージの中で書かれているように、ローカルで composer validate を実行してみると何かわかるかもしれません。

投稿2021/02/04 15:08

Lulucom

総合スコア1899

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問