Composer在弹性beanstack部署上失败 [英] Composer failing on elastic beanstack deploying

查看:97
本文介绍了Composer在弹性beanstack部署上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我开始将laravel部署到弹性beantalk之后,我就在AWS的弹性beantalk上运行了相同的部署挂钩,并且在最近的更新中,由于最新的作曲者发生了某些事情,部署失败.

I had run the same deploy hooks on AWS’s elastic beanstalk since I started deploying laravel to elastic beanstalk and on a recent update it failed to deploy due to something happening with the most recent composer.

在弹性beantalk上使用composer进行部署的常见方法是更新composer,然后使用它来安装您的软件包,直到我遇到以下错误为止,这种方法都可以正常工作

The common approach to deploy with composer on elastic beanstalk is to update composer then use it to install your packages, which worked fine until I got the following error

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException] 
 Error Output: PHP Warning: require(/var/app/ondeck/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/app/ondeck/bootstrap/autoload.php on line 17 

 PHP Fatal error: require(): Failed opening required ‘/var/app/ondeck/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/app/ondeck/bootstrap/autoload.php on line 17

如您所见,由于作曲家无法正常运行,laravel无法从供应商文件夹中找到自动加载文件

As you can see, laravel couldn’t find the autoload file from the vendor folder which was a result of composer not running correctly

什么是错误以及如何解决.

What would be the error and how to fix it.

推荐答案

当您对composer文件的开发进行了许多更改并且您设置为部署的环境没有更新时,我遇到了同样的问题作曲家.在部署之前,首先通过更新作曲家来更新您的部署计算机.这样可以解决您的问题.

I had the same issue this comes when you have made lot of changes in the development to the composer file and the environment which you set to deploy has no updates on the composer. First update you deployment machine by updating composer before deploying. This will solve your issue.

这篇关于Composer在弹性beanstack部署上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆