Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

WiGeeky's avatar

Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable.

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 does not seem to be an issue when setting the project up on our alpine CI/CD, any ideas what is causing this?

0 likes
2 replies
tisuchi's avatar

@wigeeky Try with-

  • Clear the bootstrap/cache
  • Remove /vendor folder and install everything again
Artwork's avatar

One of the reasons of the mentioned error while executing php artisan cache:clear or composer install is a missing/undefined class item stated in config/app.php file's 'providers' array ("Autoloaded Service Providers") - either actually missing service provider class file or incorrectly stated in the "use" section.

An example of error:

$ php artisan -- 'cache:clear';
In Container.php line 1126:
  Target [Illuminate\Contracts\Notifications\Dispatcher] is not instantiable. 

Please or to participate in this conversation.