2

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.

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

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.

1
  • Can you paste your autouploader.php file? Commented Jun 10, 2016 at 11:59

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Can you elaborate? I've tried composer dumpautoload and composer update. What else should I do?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.