skip to Main Content

I got this error message after trying to downgrade laravel 9 to 8 cause i recently downgraded my php version from 8 to 7.3

In Facade.php line 178:
                                                   
Facade does not implement getFacadeAccessor method.  
                                                   

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

5

Answers


  1. its because you forgot to run

    php artisan ui vue –auth

    after composer require laravel/ui

    Login or Signup to reply.
  2. in config/app.php replace

     'aliases' => Facade::defaultAliases()->merge([ ])->toArray(),
    

    with:

    
    'aliases' => [
    
            'App' => IlluminateSupportFacadesApp::class,
            'Arr' => IlluminateSupportArr::class,
            'Artisan' => IlluminateSupportFacadesArtisan::class,
            'Auth' => IlluminateSupportFacadesAuth::class,
            'Blade' => IlluminateSupportFacadesBlade::class,
            'Broadcast' => IlluminateSupportFacadesBroadcast::class,
            'Bus' => IlluminateSupportFacadesBus::class,
            'Cache' => IlluminateSupportFacadesCache::class,
            'Config' => IlluminateSupportFacadesConfig::class,
            'Cookie' => IlluminateSupportFacadesCookie::class,
            'Crypt' => IlluminateSupportFacadesCrypt::class,
            'Date' => IlluminateSupportFacadesDate::class,
            'DB' => IlluminateSupportFacadesDB::class,
            'Eloquent' => IlluminateDatabaseEloquentModel::class,
            'Event' => IlluminateSupportFacadesEvent::class,
            'File' => IlluminateSupportFacadesFile::class,
            'Gate' => IlluminateSupportFacadesGate::class,
            'Hash' => IlluminateSupportFacadesHash::class,
            'Http' => IlluminateSupportFacadesHttp::class,
            'Js' => IlluminateSupportJs::class,
            'Lang' => IlluminateSupportFacadesLang::class,
            'Log' => IlluminateSupportFacadesLog::class,
            'Mail' => IlluminateSupportFacadesMail::class,
            'Notification' => IlluminateSupportFacadesNotification::class,
            'Password' => IlluminateSupportFacadesPassword::class,
            'Queue' => IlluminateSupportFacadesQueue::class,
            'RateLimiter' => IlluminateSupportFacadesRateLimiter::class,
            'Redirect' => IlluminateSupportFacadesRedirect::class,
            // 'Redis' => IlluminateSupportFacadesRedis::class,
            'Request' => IlluminateSupportFacadesRequest::class,
            'Response' => IlluminateSupportFacadesResponse::class,
            'Route' => IlluminateSupportFacadesRoute::class,
            'Schema' => IlluminateSupportFacadesSchema::class,
            'Session' => IlluminateSupportFacadesSession::class,
            'Storage' => IlluminateSupportFacadesStorage::class,
            'Str' => IlluminateSupportStr::class,
            'URL' => IlluminateSupportFacadesURL::class,
            'Validator' => IlluminateSupportFacadesValidator::class,
            'View' => IlluminateSupportFacadesView::class,
        ],
    
    Login or Signup to reply.
  3. In my case the error started to appear, after run Laravel Shift to upgrade from 8.x to 9.x, where I’ve executed composer install instead composer update.

    Then, I’ve deleted the vendor folder and run composer update.

    Now everything is fine.

    Login or Signup to reply.
  4. Same for me after running Laravel Shift.
    You probably have a dependency using an older version of illuminate/support.

    You have to use an illuminate/support version >= 9

    Simply add or update thie line in composer.json:

    "illuminate/support": "^9.46",

    Login or Signup to reply.
  5. In my case, I was downgrading the php version to 8.0.1 was causing the issue.. however, updating to 8.0.2 and laravel/farmework to ^9.2 helped me to get rid of the error

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search