简体   繁体   English

Laravel php artisan config:cache抛出Uncaught RuntimeException:尚未设置外观根。 安装新的作曲家程序包后

[英]Laravel php artisan config:cache throws Uncaught RuntimeException: A facade root has not been set. After installing new composer package

My laravel project was working all fine in its development environment after including a php dependency Shopify/shopify-php: ^0.11.0 and doing a php artisan config cache. 我的laravel项目在包含php依赖Shopify/shopify-php: ^0.11.0并进行了php artisan config cache之后,在其开发环境中一切正常。 Everything went fine until i pulled the same branch into a different directory and did a composer install for new dependency to reflect. 一切正常,直到我将同一分支拉到另一个目录中,并进行了作曲家安装以反映新的依赖性。 Where following error came up on doing php artisan config:cache post install. 在执行php artisan config:cache post install之后出现以下错误。 And I have no clue where to start debugging it. 而且我不知道从哪里开始调试它。

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))

Here's my gitignore if that helps 这是我的gitignore,如果有帮助

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

Also checking out to a branch with the older dependencies, doing php artisan config:cache and returning to new branch and doing php artisan config:cache works fine. 还签出到具有较早依赖性的分支,执行php artisan config:cache并返回到新分支并执行php artisan config:cache可以正常工作。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的 RuntimeException:尚未设置外观根。 在 Facade.php:258 升级到 Laravel 时 - Uncaught RuntimeException: A facade root has not been set. in Facade.php:258 when upgrading to Laravel 7 Laravel 5.6 Uncaught RuntimeException:尚未设置外观根。 在vendor / laravel / framework / src / Illuminate / Support / Facades / Facade.php:218中 - Laravel 5.6 Uncaught RuntimeException: A facade root has not been set. in vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:218 如何解决 未设置门面根。 在 Facade.php 第 236 行:Laravel 5.8? - How to solve A facade root has not been set. In Facade.php line 236: Laravel 5.8? 获取 RuntimeException:尚未设置外观根。 在 /var/www/html/vendor/.../Illuminate/Support/Facades/Facade.php - Getting RuntimeException: A facade root has not been set. in /var/www/html/vendor/.../Illuminate/Support/Facades/Facade.php 致命错误:未捕获RuntimeException:尚未设置外观根 - Fatal error: Uncaught RuntimeException: A facade root has not been set 将 Laravel 从 5.7 更新到 5.8 会导致此错误:致命错误:未捕获的运行时异常:尚未设置外观根 - updating Laravel from 5.7 to 5.8 results in this error: Fatal error: Uncaught RuntimeException: A facade root has not been set 尚未设置外观根。 流明 - A facade root has not been set. in lumen 在共享主机上使用 Laravel 项目部署错误(未捕获的 RuntimeException:尚未设置外观根) - Deploy error with Laravel project on Shared Hosting (Uncaught RuntimeException: A facade root has not been set) “RuntimeException:尚未设置立面根” - "RuntimeException: a facade root has not been set" Laravel 5.5应用程序不再通过“未设置外观根目录”引导。 - Laravel 5.5 application not booting anymore with “A facade root has not been set.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM