Using Alpine.js inside the existing app with Filament table
Hi, I have a Laravel application and am using Alpine and have a Filament Table installed inside the application
//
})
Alpine.start()
html
@filamentScripts
<script src="{{ asset('js/app.js') }}"></script>
log
Uncaught TypeError: Cannot read properties of undefined (reading '$on')
at Proxy.init (eval at safeAsyncFunction (app.js:605:14), <anonymous>:13:24)
at app.js:591:23
at tryCatch (app.js:545:12)
at evaluate (app.js:571:32)
at Function.<anonymous> (app.js:2924:27)
at flushHandlers (app.js:709:46)
at stopDeferring (app.js:714:5)
at deferHandlingDirectives (app.js:717:3)
at initTree (app.js:200:3)
at app.js:155:5
```
So is there any way to fix this problem?
Thanks guys.
- app.js
```js
import Alpine from 'alpinejs'
//
})
Alpine.start()
html
@filamentScripts
<script src="{{ asset('js/app.js') }}"></script>
log
Uncaught TypeError: Cannot read properties of undefined (reading '$on')
at Proxy.init (eval at safeAsyncFunction (app.js:605:14), <anonymous>:13:24)
at app.js:591:23
at tryCatch (app.js:545:12)
at evaluate (app.js:571:32)
at Function.<anonymous> (app.js:2924:27)
at flushHandlers (app.js:709:46)
at stopDeferring (app.js:714:5)
at deferHandlingDirectives (app.js:717:3)
at initTree (app.js:200:3)
at app.js:155:5
```
So is there any way to fix this problem?
Thanks guys.