Skip to content
Advertisement

Livewire views not found after deployment

After deployment to Forge, my Laravel Livewire site is throwing out a server error. I am using Digital Ocean as well. In the Forge site logs it says that my livewire view can’t be found. The app works perfectly on local. Any ideas what to do?

I have attempted these commands php artisan commands

Here is the site logs pt.1 log part 1

and pt.2 enter image description here

I have followed the path of my files and I can confirm there aren’t any spelling errors, and to my knowledge, the names of my files are not an issue, since I have followed conventional php artisan make:livewire folder.FooBar as the documentation states. One thing I might think was that I changed the names and rearranged the folders maybe 20 commits before my deployment commit, but I can’t see that affecting anything. Please if you have any suggestions I’d love the help

Here is my github Repository

Advertisement

Answer

It’s a matter of case-sensitivity.

In your linked repository, the folder for your resources/views/livewire/home/home- index.blade.php, is actually called resources/views/livewire/Home/home-index.blade.php, which is a different animal altogether. Notice the capital H in your Home folder. The same thing applies to the other folders within your Livewire resources folder.

Having the folders with capital letters can work in some environments, and not work in others – for different reasons, and to avoid it, all your folders within your resources directory should always be named with lower-case.

For future reference, this is how I create Livewire components with artisan, and then don’t touch the names without using the appropriate renaming command.

php artisan make:livewire Home/HomeIndex

If you want to use the kebab-case notation, note that it’s all lowercase.

php artisan make:livewire home.home-index
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement