1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Wire:poll never called and JS errro : ReferenceError: Livewire is not defined

Discussão em 'Outras Linguagens' iniciado por Jean François Manatane, Novembro 7, 2024 às 12:52.

  1. Hell all,

    When I try to use Livewire.on on my blade file, I got :

    I got ReferenceError: Livewire is not defined in my JS chrome console.

    Also my poll function is never called :

    <div wire:poll.keep-alive ="myFunction">


    (the mount method is called)

    I use Laravel Framework 11.25.0 And Livewire v3.5.6

    I have included.

    @livewireScripts

    before my

    and @livewireStyles in

    I also tried :

    php artisan livewire:publish --assets


    But it is the same

    Anyway, the script is there, at the end of HTML, so I don't think is a resource issue :

    <!-- Livewire Scripts --> <script src="http://localhost:8000/vendor/livewire/livewire.js?id=cc800bf4" data-csrf="XlSYyXOXSjYqjzZ2YNN0Qs4vXTA8fkPkE68wQ7js" data-update-uri="/livewire/update" data-navigate-once="true"></script> </body>


    And I can click on the URL, I see the content of the JS file

    In my .env file the APP_URL is set up correcly

    Any idea?

    Thanks

    Continue reading...

Compartilhe esta Página