livewire: "Unable to find component" on sub-domain
Describe the bug I created a Livewire component on my local machine. When I uploaded the code to my testing server it was showing the component @livewire as a text string in the browser (@livewire(‘inventory.inventory-pricing’, $vehicle->prices, $vehicle->id, $vehicle->vin)).
I then made a very simple component and uploaded to the test server (test.domain.com) and getting “Unable to find component” error.
To Reproduce Steps to reproduce the behavior:
- run: php artisan make:livewire livewirejunk
- In web.php add: Route::view(‘/livewire’, ‘livewire’);
- Source of livewire.blade.php:
@extends('layouts.app')
@section('headers')
<style>
.fixed-sn main {
margin-left: 2% !important;
margin-right: 2% !important;
}
</style>
@endsection
@section('content')
<h1 class="text-center">Livewire Test!</h1>
<div>
@livewire('livewirejunk')
</div>
@endsection
@section('scripts')
@livewireAssets
@endsection
- Source of livewire\livewirejunk.blade.php:
<div>
{{-- Care about people's approval and you will be their prisoner. --}}
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat unde repellat ea incidunt. Quos sequi aspernatur delectus vero iste, ut voluptates minima voluptatibus placeat, dolore doloribus iure expedita quia assumenda!
</div>
</div>
- Source of App\Http\Livewire\livewirejunk.php:
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Livewirejunk extends Component
{
public function render()
{
return view('livewire.livewirejunk');
}
}
Expected Result

Error “Unable to find component: [livewirejunk] (View: /var/www/html/projectfolder/resources/views/livewire.blade.php)”
Test Server
- Ubuntu 18.04.6 LTS
- Server version: Apache/2.4.18 (Ubuntu)
- Node v4.2.6
- Laravel v5.8.32
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (9 by maintainers)
Have you tried to rediscover the components? It helped me:
php artisan livewire:discover
Problem:
php artisan livewire:make TableComponentSolution:
php artisan livewire:make tableAwesome, thanks @intellow !
@calebporzio I can work on the PR. 😄 I’ve been looking for something else to help out with.