Search code examples
typescriptaureliasockjs

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?


Solution

  • Try:

    import SockJS = require('sockjs-client');