Hi there.
I have a Laravel application, where I am trying to install Alpine.js (Using NPM) together with wire-elements/modal. In my app.js file I have this:
require("./bootstrap");
require("alpinejs");
window.Alpine = Alpine;
Alpine.start();
I am loading the app.js file in my app.blade.php view file:
<!-- Scripts -->
<script src="{{ mix('js/app.js') }}" defer></script>
<script src="{{ mix('js/modal.js') }}" ></script>
This gives me an error like the below though:
Uncaught TypeError: Cannot read properties of undefined (reading 'get')
If I remove Alpine.start(); from my app.js file, the error goes away (but Alpine is not working then).
Hi there.
I have a Laravel application, where I am trying to install Alpine.js (Using NPM) together with wire-elements/modal. In my app.js file I have this:
I am loading the
app.jsfile in myapp.blade.phpview file:This gives me an error like the below though:
If I remove
Alpine.start();from my app.js file, the error goes away (but Alpine is not working then).