Select and media upload not loading and working correctly
I’ve built an admin panel using Filament, Filament Forms, and Spatie Media Library Upload. However, I’m encountering issues in production where two of my components are not loading correctly, and I’m seeing multiple AlpineJS errors. Strangely, everything works perfectly in my local environment.
Issue:
When using Filament Forms and Spatie Media Library together in production, two of my components fail to load correctly, and I see numerous AlpineJS errors in the console.
No issues on local environment.
Errors occur only in production.
What I’ve Tried:
Reinstalling AlpineJS.
Upgrading Laravel and all packages to Laravel 12 (this issue occurred on Laravel 11 as well).
Publishing all config files.
Running npm run build multiple times.
Despite these attempts, the issue persists in production, and I’m still encountering AlpineJS-related problems.
Additional Context:
The problem began when I added the Spatie Media Library plugin to my project.
It seems like a possible conflict with Livewire and AlpineJS, but I can’t pinpoint the exact cause.
Local Environment: Works flawlessly.
Production Environment: Errors and broken components.
Expected Behavior:
The components should work the same way in production as they do locally, without any AlpineJS errors.
Screenshots/Logs:
I’m happy to provide console logs or screenshots if needed.
Questions:
Are there any known conflicts between Filament, AlpineJS, and Spatie Media Library?
Could this be an issue with how assets are compiled for production?
Do I need to configure Livewire, AlpineJS, or Filament differently in production?
Any guidance or advice on how to resolve this issue would be greatly appreciated!

Solution:Jump to solution
@Leandro Ferreira The problem has been solved now. I did not have the correct filament javascript files in my root folder.
34 Replies
share the console errors










does it work if you remove
Spatie Media Library
?Remove the whole thing from the filament panel?
you said: The problem began when I added the Spatie Media Library plugin to my project.
does it work if you remove it?
Good one! will check it when I come home.
No, now the skills used is still the same.

weird.. I've never seen this error before.. 🤔
I've gotten 2 warnings and 2 errors less in my console 🫡
you mentioned that it works locally, right?
Yep, perfectly
could you run
php artisan filament:assets
php artisan filament:optimize-clear
?Done! Sadly no results
what server/service are you using to deploy it?
Siteground
php artisan vendor:publish --force --tag=livewire:assets
?I've got another website hosted at siteground, but everything is working fine there.
now my screen is completly black
edit: i have moved the folder that was placed in the public folder to the root folder, now my screen is not black but nothing changed/.
this command publishes livewire files here
public/vendor/livewire
any console errors?yeah but now 20 less!
I mean, with black screen

oh didn't check...

I am gonna move the directory back.

does it happen when you login?
Thats the error that the vendor file is not placed in the root folder. when I place the vendor file in the root folder, the process continues
but as anwer on your question: yes.
Livewire issue in your server I think
But I don't have idea how to solve it
I can try to deinstall livewire lol
php artisan vendor:publish --force --tag=livewire:assets
should solve it
you can try it
open a ticket on Siteground support.. maybe they can help youfilament/support v3.3.3 requires livewire/livewire (^3.5)
shit
thanks
Solution
@Leandro Ferreira The problem has been solved now. I did not have the correct filament javascript files in my root folder.