Laravel 5.8:宅基地重启后尚未设置立面根 [英] Laravel 5.8: A facade root has not been set after homestead restart

查看:54
本文介绍了Laravel 5.8:宅基地重启后尚未设置立面根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图进入Laravel,这是我第一次使用Vagrant,所以这是我的问题:

so I'm trying to get into Laravel and this is my first time using Vagrant, so here's my problem:

我已经完成了 Laravel Homestead的介绍,并设置了我的开发盒,所有内容似乎可以正常使用了,我确实看到了Laravel默认应用.结束一天后,我使用vagrant halt停止了本地无业游民,然后像以前一样尝试使用vagrant up重新启动它,然后收到了

I've worked through the Laravel Homestead introduction and set up my development box, everything appears to be working and I did see the Laravel default app.When wrapping up the day I've stopped the local vagrant using vagrant halt and tried starting it again using vagrant up as before and then I'm receiving the

((!)致命错误:未捕获RuntimeException:门面根目录没有 被设置.在 /home/vagrant/code/laravel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php 在234行上"

"( ! ) Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/vagrant/code/laravel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234"

尝试访问我的Laravel应用时显示的消息.由于这对于一个全新的项目也会发生,因此我认为我缺少了一些非常基本的知识,有人可以告诉我如何处理Vagrant,以便在重新启动虚拟机后仍可以到达我的项目吗?

Message when trying to reach my Laravel app. Since this also happens for a completely new project, I assume that I'm missing something very basic, could anyone tell me how to handle Vagrant so that I can still reach my project after restarting the virtual machine?

除了最初通过composer创建Laravel应用程序外,我没有编写任何代码,该错误不会弹出,因为我试图使用某些东西并且做错了.我正在使用新应用程序的默认状态,它会弹出.

I did not write any code except initially creating the Laravel application via composer, the error does not pop up because I'm trying to use something and am doing it wrong. I am using the default state of a new application and it pops up.

推荐答案

之所以会出现此问题,是因为通过无业游民安装的默认laravel/homestead框设置为v8.0.0-alpha2,这似乎很破损.您将需要重新安装该包装盒并删除当前包装盒.

Ran into this issue because the default laravel/homestead box installed via vagrant is set to v8.0.0-alpha2 which seems to be very broken. You will need to reinstall the box and delete the current box.

参考: https://github.com/laravel/homestead/issues/1178

cd ~/Homestead
vagrant destroy
vagrant box remove laravel/homestead --box-version=8.0.0-alpha2
vagrant box add laravel/homestead --box-version=7.2.1
vagrant up

这篇关于Laravel 5.8:宅基地重启后尚未设置立面根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆