Heroku错误:解析composer.lock失败;它必须是非空且有效的JSON

时间:2014-07-11 02:01:31

标签: php json heroku

目前收到此错误并且不确定如何修复,我运行了编辑器更新,但没有解决它。

$ 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'

1 个答案:

答案 0 :(得分:3)

我刚才有同样的问题。但是,在仔细检查之后,锁定文件是有效的JSON并且是一个有效的文件。

解决方案原来是将作曲家本身“作曲家自我更新”更新到最新版本然后它运作良好