前提・実現したいこと
現在Laravelにてポートフォリオを作成しており、ようやくデプロイの段階まで来ました。
https://ayaka-weblog.com/programming/laravel/laravel-heroku/
↑
こちらの方の記事を参考にしながらmysqlの環境変数などを入れていき
git push heroku masterをしたところ以下のエラーが出てしまいました。
発生している問題・エラーメッセージ
remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Using buildpacks: remote: 1. heroku/nodejs remote: 2. heroku/php remote: -----> Node.js app detected remote: parse error: Expected another key-value pair at line 12, column 5 remote: ! Unable to parse package.json remote: remote: remote: -----> Build failed remote: remote: We're sorry this build is failing! You can troubleshoot common issues here: remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys remote: remote: If you're stuck, please submit a ticket so we can help: remote: https://help.heroku.com/ remote: remote: Love, remote: Heroku remote: remote: ! Push rejected, failed to compile Node.js app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 8f5b86cc98a4608bc93eb28e0a3fce9d80a38ce5 remote: ! remote: ! We have detected that you have triggered a build from source code with version 8f5b86cc98a4608bc93eb28e0a3fce9d80a38ce5 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 your-hero-tky. remote: To https://git.heroku.com/your-hero-tky.git ! [remote rejected] master -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/your-hero-tky.git' apple@appurunoMacBook-Air laravel_pf %
試したこと
・git push heroku masterではなくgit push heroku mainでやってみた
・composer.jsonのrequireのPHPのところを"php": "^7.3.0",にしてみた。
補足情報(FW/ツールのバージョンなど)
heroku/7.59.2 darwin-x64 node-v12.21.0
あなたの回答
tips
プレビュー