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
- try to clear
bootstarp/cache
by hand - try to remove
vendor
and install again with a specific PHP version likephp8.1 composer install
- 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 actrl c
would do the job)