Heroku未检测到composer.lock文件

时间:2019-04-12 19:39:21

标签: heroku composer-php

我想进行部署,但我不能。我不知道为什么。

我运行了composer install命令来生成锁定文件...

错误日志:

 ERROR: No 'composer.lock' found!

 A 'composer.lock' file was not found in your project, but there
 is a 'composer.json' file with dependencies inside 'require'.

 The lock file is required in order to guarantee reliable and
 reproducible installation of dependencies across platforms and
 deploys. You must follow the Composer best practice of having
 your lock file under version control in order to deploy. The
 lock file must not be in your '.gitignore'.

我的.gitignore

/vendor
/.idea
Homestead.json
Homestead.yaml

我提交了文件。 我最近的3次提交(来自git log --oneline):

19cb5e3 (HEAD -> demo) env update
2ce2333 added composer.lock
285922a Demo

1 个答案:

答案 0 :(得分:0)

您能否删除供应商文件夹+ composer.lock,然后尝试运行composer安装。