1 year ago

Facade Root Has Not Been Set

Posted 1 year ago by KatWalsh

After a computer died a few months ago, trying to get my local dev set up on a new box.

I installed Composer, VirtualBox, Vagrant, and Homestead. Those seem to be fine. If I put a test php file in a directory, I can get to it, and it runs php correctly. I also installed phpMyAdmin for Homestead and that is also fine.

At this point I tried both a completely fresh Laravel install (5.8) AND upgrading my existing project from 5.6 to 5.8, but got the same error message when trying to access the site locally.

RuntimeException: A facade root has not been set. in /home/vagrant/code/leopards/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234

I have not added any additional plugins - just Homestead and Laravel.

I followed the instructions here (https://laravel.com/docs/5.7/upgrade) for the 5.6 to 5.7 upgrade (added the svg directory; changed or to ?? in my blade files; added cache directory;) and then here (https://laravel.com/docs/5.8/upgrade) for the 5.7 to 5.8 upgrade (added incrementing=true for some of my pivot models). Updated my composer.json file and ran composer update.

I also tried deleting my vendor directory and composer.lock file and doing a new composer install.

Considering I'm getting the same error with a fresh install (just running 'laravel new projectname') and a project that was running fine on my previous computer, I feel like it isn't my code/application itself but something I missed in setting up this new computer, a dependency or architecture or something. I'm on Ubuntu 18.04 if that relates (which is the same as my previous computer).

Any thoughts or suggestions for what else I might try or where else I can look? I've been fighting with this for days now and it is driving me crazy!


Please sign in or create an account to participate in this conversation.