hotwired-laravel / turbo-laravel

This package gives you a set of conventions to make the most out of Hotwire in Laravel.
https://turbo-laravel.com
MIT License
795 stars 48 forks source link

Uncaught TypeError: Livewire.on is not a function #79

Closed dhruva81 closed 2 years ago

dhruva81 commented 2 years ago

I am receiving following error in console.

Uncaught TypeError: Livewire.on is not a function

I have installed turbo-laravel package and also using livewire-turbolinks bridge.

tonysm commented 2 years ago

Uhm, I don't see that in my app. @dhruva81 Can you try creating a sample app where you're reproducing the issue, publish it on GitHub, and drop the link here?

tonysm commented 2 years ago

Uhm, maybe you're including the livewire-turbolinks bridge before the Livewire scripts?

Take a look at this sample app: https://github.com/tonysm/turbo-demo-app/blob/main/resources/views/layouts/app.blade.php#L54-L55

dhruva81 commented 2 years ago

Hi @tonysm
Thank you for replying.

After spending some couple of hours, I am able to figure out, that this error was coming because of another package 'wire-elements/modal', I was using.

I have resolved the issue, by making some changes in config file of that package.

Kindly close this issue.

Thank you very much.

MACscr commented 2 years ago

Would you mind sharing your change here for others benefit? I am using the same package and running into the same error.