dongyou6768 2019-05-08 11:06
浏览 321
已采纳

在重新结账后运行`composer install`时,“尚未设置Facade root”

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?

  • 写回答

1条回答 默认 最新

  • dousigan0499 2019-05-08 11:49
    关注

    After scouring the logs, it turns out that this was down to a missing php7.3-mysql driver. Running sudo apt-get install php7.3-mysql solved the problem!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部