Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'League\Flysystem\AwsS3v3\AwsS3Adapter' not found (Laravel + Heroku)

connect my laravel 5.4 application in heroku with aws s3 to save and display images that I upload with a dashboard.

In local I have no problem with uploading and viewing the images, even these are stored in the bucket I made. But when I set up aws in heroku to do tests there, I get the error: Class 'League\Flysystem\AwsS3v3\AwsS3Adapter'

I already removed and reinstalled the package from composer, I do not know why the error does not appear in my local environment.

thank you very much.

like image 470
SundayGirl Avatar asked Aug 10 '17 16:08

SundayGirl


3 Answers

you forgot to install the required library

composer require league/flysystem-aws-s3-v3

good luck

like image 75
bara batta Avatar answered Nov 15 '22 21:11

bara batta


For laravel 8 use

 composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"
like image 31
Josh Alecyan Avatar answered Nov 15 '22 23:11

Josh Alecyan


I solved mine with

composer require guzzlehttp/psr7 "1.8.1"

to first downgrade from version 2.0.0 as the was sdk package doesn't yet support version 2.0.0.. then

composer require league/flysystem-aws-s3-v3 "~1.0" --update-with-all-dependencies
like image 2
JimloveTM Avatar answered Nov 15 '22 22:11

JimloveTM