JS error can't access property "get", this.$wire is undefined #1409
-
Have you searched through other issues to see if your problem is already reported or has been fixed?Yes, I did not find it. Did you read the documentation?Yes, I did not find it. Have you tried to publish the views?Yes - I didn't work. Is there an error in the console?There is an error in the browser console: PHP Version8.2.12 PowerGrid5.3.7 Laravel10.43.0 Livewire3.4.4 Alpine JS3.13.5 ThemeBootstrap Describe the bug.When using flatpickr and using field with datepicker filter, I get the error described above. My app.js is as follows: import * as bootstrap from 'bootstrap';
import * as Popper from '@popperjs/core';
import axios from 'axios';
window.axios = axios;
import Alpine from 'alpinejs'
window.Alpine = Alpine
Alpine.start()
import flatpickr from "flatpickr";
import './../../vendor/power-components/livewire-powergrid/dist/powergrid'
import './../../vendor/power-components/livewire-powergrid/dist/powergrid.css' This has also been reported by another user in discussions #1229 but it seems to be for different reasons. Any help or advice is appreciated. To Reproduce...
Extra informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @akulmehta, can you add Alpine.start() to the last line of the js? No need import Alpine from alpinejs |
Beta Was this translation helpful? Give feedback.
Hi @akulmehta, can you add Alpine.start() to the last line of the js?
No need import Alpine from alpinejs
https://livewire.laravel.com/docs/upgrading#accessing-alpine-via-js-bundle