I am trying to install and setup yjs and y-socket.io libraries in Music Blocks. Though I've installed the libraries using npm but I am not able to access them in the collaboration.js file or anywhere else.
I have tried import * as Y from "yjs" (CommonJS) and const Y = require("yjs")" (ES module) both the methods but getting errors. Using CommonJS, I am getting the error Cannot use import statement outside a module, and in ES module, I am getting require not defined
If you can provide any insight to sort this issue out, It'd be really helpfull.
Addresses: #3851
I am trying to install and setup
yjs
andy-socket.io
libraries in Music Blocks. Though I've installed the libraries using npm but I am not able to access them in thecollaboration.js
file or anywhere else.I have tried
import * as Y from "yjs"
(CommonJS) andconst Y = require("yjs")"
(ES module) both the methods but getting errors. Using CommonJS, I am getting the errorCannot use import statement outside a module
, and in ES module, I am gettingrequire not defined
If you can provide any insight to sort this issue out, It'd be really helpfull.