After making the js setup, everything seems to work just fine, but I cant get alpine to work. I put some directives and events just to make sure it was working, but it just seems like if there were no alpine code at all
my only guess is something in the file app.js, specially this piece of code
let liveSocket = new LiveSocket("/live", Socket, {
params: { _csrf_token: csrfToken },
hooks: hooks,
dom: {
onBeforeElUpdated(from, to) {
if (from._x_dataStack) {
// _x_dataStack is undefined
window.Alpine.clone(from, to);
}
},
},
});
I even tried to clone the authors repository, but still the same
Does AlpineJS work at all? This code above only help with communication with LiveView, so if AlpineJS doesn’t work - problem is somewhere else. Make sure you run Alpine.start() after import.
This is the Alpine JS v3 property. Can you check your assets/node_modules/alpinejs/package.json file to see what the version it has is? You may need to bump the version if it’s 2.x