igorkosandyak / angular2-websokets

20 stars 27 forks source link

TypeError: sockjs_client_1.SockJS is not a constructor #1

Open gustavomr opened 6 years ago

gustavomr commented 6 years ago

Trying to use your code and getting this error.

TypeError: sockjs_client_1.SockJS is not a constructor

Can you help me?

pcsantana commented 6 years ago

I was facing the same problem. Try to use the imports in app.component.ts like this:

import * as Stomp from 'stompjs';
import * as SockJS from 'sockjs-client';
import * as $ from 'jquery';