user3909296 user3909296 - 2 months ago 42
TypeScript Question

Module sockjs-client has no exported member "SockJS"

I am trying to import SockJS from the sockjs-client library. I am using Aurelia and typescript, but when trying to import that with

import { SockJS } from 'sockjs-client';


it says in VS2015: "Module sockjs-client has no exported member "SockJS""

package.json looks like this:

"jspm": {
"dependencies": {
//......
"sockjs": "npm:sockjs@^0.3.17",
"sockjs-client": "npm:sockjs-client@^1.1.1",
"stompjs": "npm:stompjs@^2.3.3",
},
"devDependencies": {}
}


Can anyone help?

Answer

Try:

import * as SockJS from 'sockjs-client';
Comments