mclintprojects/actioncable-vue

vue 3 - Uncaught TypeError: Cannot set property '$cable' of undefined

Closed this issue · 4 comments

I am trying to add actioncable-vue to vue 3 but I get "Uncaught TypeError: Cannot set property '$cable' of undefined"
My main.js file is something like:

`

import ActionCableVue from 'actioncable-vue';
const app = createApp(App).use(store).use(router).use(i18n);

app.use(ActionCableVue, {
debug: true,
debugLevel: 'error',
connectionUrl: 'ws://localhost:3000/challenges', // or function which returns a string with your JWT appended to your server URL as a query parameter
connectImmediately: true
});
app.mount('#app')
`

This library currently only works with Vue 2.x. I'll spend this weekend looking into adding Vue 3 support.

Seems like I can't make the library work with both Vue 2.x and Vue 3. Closing this now.

If you're having trouble getting it to work on both versions, can you please make a branch where this only works on Vue 3? I'd like to help and see if I can get it working on both @mclintprojects

@andrescastillodf Vue 3.x support has been added now thanks to #37. Kindly update to actioncable-vue v2.4.0