Livewire encountered a missing root tag when trying to render a component. On widget

Someone that can help me? I get this error "Livewire encountered a missing root tag when trying to render a component. When rendering a Blade view, make sure it contains a root HTML tag.". If I follow the stack trace I see it is because of an Filament Chart widget, but I did it according to the docs of filament so I don't need to do anything else. This is on an filament dashboard. I also can not recreate the error locally, this is only in production. Thanks in advance
4 Replies
acroninja
acroninja3w ago
I have the same thing happen only on the first load after deployment. Seems that once some view is cached it's fine. Still annoying though
Rolland
Rolland3w ago
you could run composer dump-autoload and php artisan filament:optimize
GizaRex
GizaRexOP3w ago
Going to try the filament:optimize in my deployment script Yeah, exact the same problem
acroninja
acroninja2w ago
HAHAHA, think i've solved it. I tried running
artisan view:cache
artisan view:cache
and got this error:-
Symfony\Component\Finder\Exception\DirectoryNotFoundException

The "/resources/views/errors" directory does not exist.
Symfony\Component\Finder\Exception\DirectoryNotFoundException

The "/resources/views/errors" directory does not exist.
I just created that directory, and added a .gitignore file inside it so it would be committed. And the error has gone and the views cache OK.
Want results from more Discord servers?
Add your server