redlik's avatar

Livewire modal freezing page

I'm having a strange error, where closing down a modal freezes the site and throws these errors:

Uncaught (in promise) Object { isFromCancelledTransition: true }
Uncaught (in promise) TypeError: l is not a function - this one is thrown 2x

I'm using Alpinjs and x-show to show / hide my modal. Everything works perfect, apart from the situation when my livewire function saves new model, clears the input boxes and sends showModal = false which freezes the page and throws the errors above

0 likes
4 replies
redlik's avatar
redlik
OP
Best Answer
Level 2

I found the issue, alpinejs was loaded both from the node module folder and link inside head. Removing the latter fixed the issue. I'll keep the topic in case other people have the same issue

3 likes
michael@cronin.software's avatar

@redlik Worked for me also, had a similar issue, I had two asset(js/app.js) links in the head tag on app.blade. Thanks for posting the solution also, it lead me to where to look.

petitemo's avatar

I have the same issue and it works like a charm after remove my alpine js link. Thanks @redlik ;)

Please or to participate in this conversation.