Home > Back-end >  Laravel 8.83.2 Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable
Laravel 8.83.2 Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable

Time:03-28

I've been trying to set up my Laravel 8.83.2 project on an Ubuntu 20.04 LTS using PHP version 8.1.3, and no matter what I try I get the following error:

In Container.php line 1089:
                                                                     
  Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable.

This occurs while trying to run any artisan command, no other stacktrace is being outputted either.

This does not seem to be an issue when setting the project up on our alpine CI/CD, any ideas what is causing this? I can provide further information about the project if any is needed.

CodePudding user response:

it seems like a mismatch problem with versions

  1. try to clear bootstarp/cache by hand
  2. try to remove vendor and install again with a specific PHP version like php8.1 composer install
  3. also its better to reload your FastCGI with something like service php-fpm reload to avoid hitting opcache (if you are using it in CLI just a ctrl c would do the job)
  • Related