Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'League\Glide\ServerFactory' is not found

After attempting to remove and reinstall a package I'm getting this new error when I try to include('vendor/autoload.php');

Fatal error: Uncaught Error: Class >'ComposerAutoloaderInit7b3c839efeba468a3d595a365ceb8e89' not found in >mypath\vendor\autoload.php:7 Stack trace: #0 mypath\mypage.php(2): include() >#1 {main} thrown in mypath\vendor\autoload.php on line 7

I've tried running composer clearcache before and after reinstalling the package. I deleted C:/Users/MyUsername/AppData/Roaming/Composer and even completely uninstalled Composer. After I reinstalled composer and then reinstalled the package, the error message remains.

What am I missing? I feel like it has a hidden cache somewhere that's breaking this.

like image 654
justanotherguy Avatar asked Nov 19 '22 12:11

justanotherguy


1 Answers

Your autoloader seems to be on an unfit state.

Just regenerate it.

composer dump-autoload

If this doesn't work (although it should), simply remove the whole vendor directory, and run composer install again.

Clearing composer's cache has no effect on this, since this is only the one used by composer to avoid downloading files all over again, not a project level cache.

like image 188
yivi Avatar answered Dec 06 '22 06:12

yivi