I’ve run into multiple issues trying to get the documented example for Websocket Server to work. The issue I’m finally stumped on is that this line:
this.wsserver.watchMessage().subscribe(result => {
console.log(result);
});
gives this error
TypeError: window.cordova.plugins.wsserver[fnName] is not a function
I’ve tried uninstalling and reinstalling the npm packages but don’t know what else to do to try and resolve this.
For reference, previous issue was that the documented example line
import { WebSocketServer } from '@ionic-native/web-socket-server';
causes the constructor to fail because WebSocketServer is a value, and instead should be
import { WebSocketServer } from '@ionic-native/web-socket-server/ngx';
1 post - 1 participant