SaFrMo / vue3-boardgame

Vue 3 plugin for boardgame.io
5 stars 1 forks source link

Uncaught TypeError: this.transport.subscribeMatchData is not a function #5

Open rizen opened 2 years ago

rizen commented 2 years ago

If I try to create a multiplayer game using this library, I get the titular error.

It doesn't matter if I use SocketIO or Local as the multiplayer type.

Have you tried making a multiplayer game with this library?

Here's what my invocation looks like.

import { createApp } from 'vue';
import App from './App.vue';
import { boardgamePlugin } from 'vue3-boardgame';
import { HangMan } from './HangMan';
import { SocketIO } from 'boardgame.io/multiplayer';

let params = new URL(document.location).searchParams;

const app = createApp(App);
app.config.unwrapInjectedRef = true; // needed until vue 3.3
app.use(boardgamePlugin, {
  options: {
    game: HangMan,
    multiplayer: SocketIO({ server: 'localhost:8888' }),
    playerID: params.get('p'),
  }, 
  autostart: true,
  useMixin: false,
  useProvide: true,
});

app.mount('#app');
RayTF commented 1 year ago

Same thing here