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?
Try:
import SockJS = require('sockjs-client');
Try to install sockjs-client typings npm install --save @types/sockjs-client
and then import import * as SockJS from 'sockjs-client';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With