当前出现此错误,不确定如何解决,我运行了作曲家更新程序,但未能解决.
$git push
Fetching repository, done.
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 621 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
-----> PHP app detected
! ERROR: Failed parsing composer.lock; it must be non-empty and valid JSON.
Run 'composer update' to have it re-generated or removed by Composer.
! Push rejected, failed to compile PHP app
To git@heroku.com:foo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:foo.git'
解决方法:
我只是有完全相同的问题.但是,在仔细检查后,锁定文件是有效的JSON,并且是有效的文件.
原来,解决方案是将作曲家本身的“作曲家自我更新”更新为最新版本,然后工作正常