statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.71k stars 509 forks source link

Weird GlideServer error #2917

Closed aerni closed 3 years ago

aerni commented 3 years ago

Bug Description

I came across this issue when deploying my site. Deployment always fails because of it. This always happens when installing the composer dependencies. I can't even clear the cache or execute any other please command. It always screams at me with the GlideServer error. Any hint?

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In GlideServiceProvider.php line 35:

  Class 'Facades\Statamic\Imaging\GlideServer' not found  

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Environment

Statamic 3.0.30 Pro Laravel 8.16.0 PHP 7.4.12 aerni/social-links 2.1.0 aerni/zipper 1.2.0 jonassiewertsen/statamic-livewire 2.1.2 spatie/statamic-responsive-images 1.4.0 visuellverstehen/statamic-classify 2.0.0

duncanmcclean commented 3 years ago

Might be something to do with Laravel's Real-Time facades not working. I believe that's what gives it the Facades\ namespace.

Have you tried running composer dump-autoload and dumping your entire vendor directory and re-running composer install?

aerni commented 3 years ago

Yes, nothing works. I deleted the vendor folder. Ran composer install again. It always hangs at the end at Generating optimized autoload files.

duncanmcclean commented 3 years ago

Hmm, are you using Composer 1 or 2?

aerni commented 3 years ago

Composer 1.10.17

duncanmcclean commented 3 years ago

Composer 1.10.17

Try upgrading to Composer 2 and try again if possible - composer self-update && composer self-update --2.

If it breaks anything, you can downgrade with composer self-update --1 but it shouldn't.

aerni commented 3 years ago

Ok, I was able to fix it. Had to manually delete all the caches within the storage directory.

Haris1994 commented 5 months ago

Thanks @aerni