Component not found after changing a ->live() element
Hello, i have created a full page component which uses a form and a select live field to conditionally show a section, however when i change the select field, i get a "Component not found" error.
Here is the error: https://flareapp.io/share/lm2K0O0P
Here is the code:
Flare
Unable to find component: [app.http.livewire.transport-details] - The error occurred at http://localhost/transport-details/9a00a479-ec8c-4b2b-ab6f-46294488a349
Solution:Jump to solution
Yeah i started out with a hyphen and changed it to an underscore just to see what would happen. Thanks for the tip though
Turns out the issue was one of 'laziness'. Livewire 3 seems to look for components at App\Livewire rather than App\Http\Livewire and i'd generated the component using Laravel Idea plugin rather than through the CLI. I recreated the compontent using the CLI and now that its in the "correct" place, it is working fine!...
3 Replies
Unsure if this is the issue, but I've always used views with hypens instead of underscores. That doesn't seem to be the issue if the view actually loads for you, but who knows...worth a shot...especially since the error seems to be looking for the view at
transport-details
Solution
Yeah i started out with a hyphen and changed it to an underscore just to see what would happen. Thanks for the tip though
Turns out the issue was one of 'laziness'. Livewire 3 seems to look for components at App\Livewire rather than App\Http\Livewire and i'd generated the component using Laravel Idea plugin rather than through the CLI. I recreated the compontent using the CLI and now that its in the "correct" place, it is working fine!
It's interesting that it rendered in the first place...but glad you solved it! 👍