masmerise / livewire-toaster

Beautiful toast notifications for Laravel / Livewire.
MIT License
374 stars 22 forks source link

Uncaught ReferenceError #41

Closed abq0 closed 6 months ago

abq0 commented 6 months ago

I've followed the Installation guide but there's an error at the F12 -> console ( Uncaught ReferenceError: toasterHub is not defined ) & ( Uncaught ReferenceError: toasts is not defined )

Console : Screenshot from 2024-03-20 18-49-57

master blade :

<!DOCTYPE html>
<html class="scroll-smooth">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="@yield("metaTag")" data-rh="true">
        @vite('resources/css/app.css')
        <!-- Animations -->
        <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
        <title>@yield("title")</title>
        <!-- Icons -->
        <script src="https://kit.fontawesome.com/d5ccf6570c.js" crossorigin="anonymous"></script>
        @stack('links')
    </head>
    <body class="dark:bg-[#1d1d1d]">
        @section('navbar')
            @include("_partials.navbar")
            @show
        @yield('content')
        <script data-navigate-once src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
        <script data-navigate-once src="{{ asset('assets/js/jquery-3.6.4.min.js') }}"></script>
        <script data-navigate-once src="{{asset('js/preline/dist/preline.js')}}"></script>
        @stack('scripts')
        <script>AOS.init();</script>
        <script src="{{ asset('assets/js/custom.js') }}"></script>
        <x-toaster-hub />
    </body>
</html>

resources/js/app.js

import './bootstrap';
import '../../vendor/masmerise/livewire-toaster/resources/js';

And I've published the config if it's necessary to know

current versions : PHP 8.2.10-2ubuntu1 Laravel Framework 10.48.3 Livewire : v3.4.9