-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) type error #111
Comments
I'm getting the same error. The issue doesn't remain when I remove the |
I got the same Issue today, the root problem is. The package started a new instance of AlpineJS and replaced the previous AlpineJS instance that was called from laravel-notify/resources/js/notify.js Lines 1 to 12 in fddde15
The quick solution is, to remove the laravel-notify/resources/js/notify.js Lines 3 to 9 in fddde15
And paste to your main js For a long-term solution, I think someone should create a PR to add the ability to load Alpine conditionally. Or @mckenziearts can do that. |
Hello, @akunbeben, thanks for your prompt response. While the solution you showed me works, I still got one issue where the toast does not show up when it's supposed to. Like I have to refresh the page for the toast to show up which beats the whole purpose of having a toast in the first place. Is this something you have ever come across or it's an issue with my setup? |
You can't achieve that by default, using this package. This package only pushes the toast (message) to the sessions and doesn't have a listener that are listening for the toast message. An easy way, you can use other packages such as Filament/Notifications, etc. |
@MotionPhix, another alternative I found was TALL Toasts. I also struggled with the event not listening, without adding functionality myself to listen to the event. Hopefully with a newer release of this package, it has a built-in event listener hook. |
After setting up package really well but my notifications were still not working. I am using Laravel 10 and php 8.2. I am getting an error that just says
Uncaught (in promise) TypeError: i is not a function at module.esm.js:1053:28
. Anyone with a possible working solution? I am using Inertiajs and LaravelThe text was updated successfully, but these errors were encountered: