Problems in the use of sockjs-client

when using sockjs-client, we encounter the following problems. The version we use is 1.1.5. Many of the answers on the Internet say that it has been reduced to 1.0.0, but there is still a problem. What caused this?

Uncaught Error: Incompatibile socket JS! Main site uses: "1.1.5", the iframe: "1.0.0".

May.31,2021

static introduction of the front segment is no problem

<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
    var sock = new SockJS('https://mydomain.com/my_prefix');
     sock.onopen = function() {
         console.log('open');
         sock.send('test');
     };

Menu