前提・実現したいこと
下記サイトに従い、「git push heroku master」が実行したいです。
https://qiita.com/masaki-ogawa/items/2521d29c17eb8664cab8
しかし、エラーメッセージによると「composer.json」が検証できないみたいです。
「composer require linecorp/line-bot-sdk」を実行すると、lineBotのファイルの中身には「vendorファイル」「composer.json」「composer.lock」が落とせています。
composer.jsonの中身を書き換えようにも、何を書けばいいのか分からない状態です。
その他にも赤字のエラーメッセージがあり、改善箇所自体が違うのかもしれません。
発生している問題・エラーメッセージ
Enumerating objects: 828, done. Counting objects: 100% (828/828), done. Delta compression using up to 2 threads Compressing objects: 100% (799/799), done. Writing objects: 100% (828/828), 2.48 MiB | 800.00 KiB/s, done. Total 828 (delta 551), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> Using buildpack: https://github.com/heroku/heroku-buildpack-php 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: 英数字 remote: ! remote: ! We have detected that you have triggered a build from source code with version 英数字 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 アプリ名. remote: To https://git.heroku.com/アプリ名.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'
試したこと
エラーメッセージにあるように「composer validate」を入力すると下記が現れます。
https://getcomposer.org/doc/04-schema.mdにアクセスしてみたのですが、composer.jsonに入力すればいいのか分からずじまいです。
./composer.json is valid for simple usage with composer but has strict errors that make it unable to be published as a package: See https://getcomposer.org/doc/04-schema.md for details on the schema name : The property name is required description : The property description is required No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
補足情報(FW/ツールのバージョンなど)
windows10
git version 2.31.1.windows.1
PHP 8.0.3 (cli)
heroku/7.51.0 win32-x64 node-v12.21.0
gitとgithubの連携済
Heroku CLIインストール済
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。