I've come across a problem that I really don't understand. I've developed a local composer package for my Laravel app (based on an existing one that didn't do exactly what I needed it to), and now I can no longer successfully deploy my app to my AWS Elastic Beanstalk instance.
I believe my new local composer package was created correctly: I took the original composer package, moved it to a new folder called "packages" in my Laravel app root. I added a repositories
entry to my composer.json
that pointed to it:
"repositories": [
{
"type": "path",
"url": "packages/konsulting/justgiving-api-sdk"
}
]
I then ran composer require konsulting/justgiving-api-sdk @dev
and the local package was installed successfully. It works locally with no issues.
But now deploy to EB, I get the following error:
Activity execution failed, because: PHP Warning: require(/var/app/ondeck/vendor/autoload.php): failed to open stream: No such file or directory in /var/app/ondeck/artisan on line 18 PHP Fatal error: require(): Failed opening required '/var/app/ondeck/vendor/autoload.php' (include_path='.:/usr/share/pear7:/usr/share/php') in /var/app/ondeck/artisan on line 18
(ElasticBeanstalk::ExternalInvocationError)
What could be causing this issue? Literally nothing but this composer package (which works locally) is different.
I've tried composer dumpautoload
and composer update
.
/var/app/ondeck/vendor/autoload.php
exist on the server? – Chin Leung