sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
539 stars 726 forks source link

[3851] - Feat/install socketio yjs #3915

Closed apsinghdev closed 4 days ago

apsinghdev commented 4 days ago

Addresses: #3851

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.