我正在尝试将我的项目部署到 Heroku,但我的构建失败了。当它在本地部署时,我没有问题。当我应用 git push heroku master
并查看 Heroku 上的构建日志时,这就是我得到的。
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> PHP app detected
! ERROR: Basic validation for 'composer.json' failed!
!
! It must be a valid JSON document compatible with Composer.
!
! You most likely created or edited the file by hand, and it now
! contains a syntax error. Please refer to the documentation at
! https://getcomposer.org/doc/ for information on the format.
!
! You can run 'composer validate' locally on your computer for
! further diagnosis. Remember to also always keep your lock file
! up to date with any changes according to the instructions at
! https://getcomposer.org/doc/01-basic-usage.md
! Push rejected, failed to compile PHP app.
! Push failed