How to work with Socket.io-client

Hi there,

I am using socket.io-client package on wix. But when I try to run create a connection I get the following error. Not sure how to proceed further.

I already have a socketio server running on Flask (python) and want to connect my website with it.

Here is my code on wix:

$w . onReady ( function () {

const io = require ( “socket.io-client” );

const socket = io ( “https://LinenBossyPixels.akul3007.repl.co” );

io . on ( “connection” , ( socket ) => {
console . log ( socket . handshake . query ); // prints { x: “42”, EIO: “4”, transport: “polling” }
});

});

Any idea how to go about it?