Laravel php artisan config:cache throws Uncaught RuntimeException:尚未设置facade root。安装新的作曲家包后

问题描述 投票:1回答:1

我的laravel项目在包括php依赖Shopify/shopify-php: ^0.11.0和做一个php artisan配置缓存后,在其开发环境中工作得很好。一切都很顺利,直到我将同一个分支拉到另一个目录,并为新的依赖项安装了一个作曲家来反映。执行php artisan配置时出现以下错误:cache post install。我不知道从哪里开始调试它。

PHP Fatal error:  Uncaught RuntimeException: A facade root has not been set. 

in /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:234
Stack trace:
#0 /home/apps/panel/v4.0.6/app/Exceptions/Handler.php(40): Illuminate\Support\Facades\Facade::__callStatic('has', Array)
#1 /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /home/apps/panel/v4.0.6/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

如果有帮助的话,这是我的gitignore

/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
public/.htaccess

还要检查具有较旧依赖项的分支,执行php artisan config:cache并返回到新分支并执行php artisan config:cache工作正常。

php laravel laravel-5 composer-php artisan
1个回答
0
投票

composer dump-autoload之后尝试php artisan config:cache

© www.soinside.com 2019 - 2024. All rights reserved.