我使用laravel 5.4。更新配置文件后清除缓存。看起来像这个错误。
ErrorException in Filesystem.php line 111:
file_put_contents(/home/web_user/webhosts/mufer/backend.mufer.local/storage/framework/views/318a49f22562be3fc1c86c88ecc141c22e`8fed4e.php): failed to open stream: No such file or directory`
然后我尝试使用以下命令修复:
php artisan route:cache
php artisan view:clear
php artisan config:cache
和
file_put_content...fail to open stream:Permission denied in Laravel 5
一些答案是说craete / storage / framework子文件夹然后是composer update。但那也行不通。
然后我运行composer dump-autoload
and
composer update`。
但问题没有解决..
答案 0 :(得分:7)
也许您正在使用Homestead?
使用Homestead时遇到了这个问题。基本上,当您使用Homestead并从虚拟机中运行php artisan config:cache
命令时,缓存路径会被破坏。
我解决了它通过ssh登录到Homestead vagrant ssh
并从那里运行php artisan config:cache
。
答案 1 :(得分:2)
我的解决方案是chmod /storage/framework/views
目录到777。
答案 2 :(得分:0)
对我来说很有效:
php artisan view:cache
答案 3 :(得分:-1)
我有同样的问题而且我的错误很简单,这很有趣。
我忘记了AutoMapper.Extensions.Microsoft.DependencyInjection
我的一个档案。所以在后端,它试图得到这个git add
,但它并不存在。它在错误中通常非常具有描述性,但是,我正在运行一个跳过队列的作业。突然间,这个有用的例外不再存在:D
所以为了解决这个问题,我不得不:
file.php
在服务器上,我需要:
git add -A
git commit -m "blah blah"
git push