I've recently got a new PC and started to migrate the development of my project over to it. I've installed php
, composer
and git
and checked it out. I run composer install
, which pulls in all of the dependencies but then throws the following error:
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/user/PhpstormProjects/project/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:234
Stack trace:
#0 /home/user/PhpstormProjects/project/app/Exceptions/Handler.php(61): Illuminate\Support\Facades\Facade::__callStatic('environment', Array)
#1 /home/user/PhpstormProjects/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(353): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /home/user/PhpstormProjects/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(132): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /home/user/PhpstormProjects/project/artisan(33): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
# in /home/user/PhpstormProjects/project/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
I've tried to delete the vendor
directory and the composer.lock
file and then re-run composer install
, but I get the same error. It runs fine on my old machine. Am I missing a step here?