jantinnerezo / livewire-alert

SweetAlert2 wrapper for Livewire
https://livewire-alert.jantinnerezo.com
MIT License
710 stars 74 forks source link

Conflict with laravel 8 and livewire 2.0 #7

Closed michaelgatuma closed 4 years ago

michaelgatuma commented 4 years ago

Screenshot (49)

Exception

> Livewire\Exceptions\ComponentNotFoundException
> Unable to find component: [navigation-dropdown] 

To regenerate:

  1. Install new laravel application with jetstream $ laravel new laravelapp --jet
  2. Install livewire-alert $ composer require jantinnerezo/livewire-alert
  3. Open dashboard [http://127.0.0.1:8000/dashboard](http://127.0.0.1:8000/dashboard)
jantinnerezo commented 4 years ago

Hi @MichaelGatuma! Did you create a navigation-dropdown component? I guess you included it somewhere in your views and laravel can't find it.

michaelgatuma commented 4 years ago

Hello @jantinnerezo! That is with the default installation of laravel, so the navigation-dropdown exists, as well as all the other components. The same exception is thrown for all the components like the two-factor-authentication-form, logout-other-browser-sessions-form etc. I think it should just work with those without conflicts straight out of the box.

jantinnerezo commented 4 years ago

So weird, I haven't encounter that issue when installing it on my laravel 8 with jetstream project.

Did you try clearing the views?

michaelgatuma commented 4 years ago

No, not yet. let me try. Though it works when I remove the alert package, stops working when I install.

michaelgatuma commented 4 years ago

@jantinnerezo I have cleared everything cached including compiled classes and packages. The error still persists.

jantinnerezo commented 4 years ago

@MichaelGatuma I will try reproducing it later tonight with a fresh installation of Laravel + Jetstream.

dukenst2006 commented 4 years ago

I got this issue as well on Laravel 8 with jetsream, livewire is unable to find any components where LivewireAlert not imported. only the component where i imported LivewireAlert be able to load. all others components messed. after remove the package all worked as expected. thanks to look into the issue.

Best,

michaelgatuma commented 4 years ago

I got this issue as well on Laravel 8 with jetsream, livewire is unable to find any components where LivewireAlert not imported. only the component where i imported LivewireAlert be able to load. all others components messed. after remove the package all worked as expected. thanks to look into the issue.

Best,

@jantinnerezo

mafalda2007 commented 4 years ago

Hi @jantinnerezo, the whole project stopped working after installing the package.

Same error :( `> Livewire\Exceptions\ComponentNotFoundException

Unable to find component: [navigation-dropdown] `

jantinnerezo commented 4 years ago

Hi guys! sorry for the very late response. I added a new 2.0 release, it should fix the Livewire\Exceptions\ComponentNotFoundException

Thank you guys!

jantinnerezo commented 4 years ago

Just removed the LivewireAlert trait guys to your livewire components and just use the $this->alert directly

mohamedsabil83 commented 4 years ago

Return this message: Unable to locate a class or view for component [livewire-alert::script] Laravel 8 without JetStream + Livewire 2

Does this line changed <x-livewire-alert::script />?

mohamedsabil83 commented 4 years ago

Return this message: Unable to locate a class or view for component [livewire-alert::script] Laravel 8 without JetStream + Livewire 2

Does this line changed <x-livewire-alert::script />?

@jantinnerezo The right one is <x-livewire-alert::scripts />. I make a PR #8 to update it on the README file

jantinnerezo commented 4 years ago

Yeah sorry about that typo, its merged now. Thank you so much!

mafalda2007 commented 4 years ago

Great! Thanks!

michaelgatuma commented 4 years ago

@dukenst2006 the issue has been resolved. It works fine now. Thanks a lot @jantinnerezo for looking into that! I will now close the issue from my side.