TogetherJS not working after Nuxt bridge upgrade

87 Views Asked by At

After upgrading from Nuxt 2.14.12 to Nuxt Bridge, our TogetherJS implementation is not working now. From what I understand TogetherJS is not well maintained anymore but I figured it would at least work in our Vue app.

We're importing the script tag in nuxt.config.js after jquery and bootstrap. And also including a separate together-js-config file

script: [
  {
    src: "https://code.jquery.com/jquery-3.3.1.min.js",
    type: "text/javascript"
  },
  {
    src:
      "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js",
    type: "text/javascript"
  },
  {
    src:
      "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js",
    type: "text/javascript"
  },
  {
    src: "js/together-js-config.js",
  },
  {
    src: "https://togetherjs.com/togetherjs-min.js",
    //  body: true
  }
],

The error that's happening is just "TogetherJS is not defined" when trying to check if TogetherJS is running in the mounted lifestyle hook

  if (TogetherJS.running) {
    TogetherJS();
  }

Does anyone have any suggestions here? Thanks!

0

There are 0 best solutions below