[英]Uncaught RuntimeException: A facade root has not been set. in Facade.php:258 when upgrading to Laravel 7
[英]Laravel php artisan config:cache throws Uncaught RuntimeException: A facade root has not been set. After installing new composer package
我的laravel項目在包含php依賴Shopify/shopify-php: ^0.11.0
並進行了php artisan config cache之后,在其開發環境中一切正常。 一切正常,直到我將同一分支拉到另一個目錄中,並進行了作曲家安裝以反映新的依賴性。 在執行php artisan config: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 artisan config:cache
之后嘗試composer dump-autoload
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.