Property ‘over’ does not exist on type ‘typeof @stomp/stompjs/index’

  angular, sockjs, spring-websocket, stomp, websocket

I am trying to create a chat app using spring websocket and using angular as the frontend. I am importing Stomp and SockJS:

import SockJS from "sockjs-client"
import * as Stomp from "@stomp/stompjs"

And then using it as:

let socket = new SockJS('/ws');
this.stompClient = Stomp.over(socket);

But I’m getting this error at Stomp.over() and I’m not sure why. Has it been deprecated or do I need to install a module?

Source: Angular Questions

One Reply to “Property ‘over’ does not exist on type ‘typeof @stomp/stompjs/index’”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.