Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’6mo agoβ€’
2 replies
Tomi Filppu

"Alpine is not defined"

Hi!

I have an older Laravel project where Filament 3 used to work fine. Suddenly it stopped working, and all Filament views threw a JS error about Alpine not being found:

Uncaught ReferenceError: Alpine is not defined
    at livewire.js?id=df3a17f2:9434:30
    at livewire.js?id=df3a17f2:10218:3
Uncaught ReferenceError: Alpine is not defined
    at livewire.js?id=df3a17f2:9434:30
    at livewire.js?id=df3a17f2:10218:3


I upgraded to Filament 4 and the update went smoothly, but the issue still remains.

Some of the things I've tried so far:

*
php artisan filament:upgrade
php artisan filament:upgrade

*
php artisan filament:optimize-clear
php artisan filament:optimize-clear

*
php artisan filament:clear-cached-components
php artisan filament:clear-cached-components

*
php artisan vendor:publish --tag=livewire:assets
php artisan vendor:publish --tag=livewire:assets

* Added
\Livewire\Livewire::forceAssetInjection();
\Livewire\Livewire::forceAssetInjection();

* Removed
resources/views/vendor
resources/views/vendor
and
public/vendor
public/vendor

* Cleared browser cache and tested in multiple browsers
* Recompiled all frontend assets
* Toggled
inject_assets
inject_assets
in
livewire.php
livewire.php
config (
true
true
and
false
false
)
* Uninstalled Filament completely (and removed all code references to it) and did a fresh Filament 4 install.

On the actual app, Alpine and Livewire works perfectly. The error only appears in Filament.

* I originally started this project on Laravel 7, but it's currently upgraded to Laravel 12.
* It uses the older project structure (not updated to the Laravel 11/12 structure).

At this point I feel like I must have messed something up, since I can't really find anyone else running into this issue. But I'm pretty much out of ideas on what to try next.

Any suggestions would be greatly appreciated! πŸš€
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Alpine Expression Error: table is not defined
FilamentFFilament / β“β”Šhelp
9mo ago
Alpine Expression count is not definedExpression: "count++"
FilamentFFilament / β“β”Šhelp
16mo ago
Relation Manager Alpine Expression Error: selectedRecords is not defined
FilamentFFilament / β“β”Šhelp
17mo ago
Alpine Expression Error: error is not defined when using fileupload
FilamentFFilament / β“β”Šhelp
2y ago