1

I'm trying to integrate Backendless JS-SDK into the NativeScript application. The JS-SDK is dependent on socket.io.client module which is not supported in the NS environment.

So, the first problem with the socket.io.client module I've solved by adding an alias in the custom webpack.json

const webpackConfig = require("./webpack.config");

module.exports = (env) => {
    env = env || {};

    env.alias = Object.assign({}, env.alias, {
        'socket.io-client': 'nativescript-socketio'
    });

    return webpackConfig(env);
}

but after that, I started receiving another error: Object is not a function (near '...io...') and I tried to change initializing SocketIO instance as it described here nativescript-socket.io and now I get another error: Can't find variable: SocketManager, after some investigation I found the code line where the error comes from, ``:

socketio.ios.js#130

Has anybody got this error? Thanks in advance for any help!

  • Sounds like your native libraries are installed properly, generally a clean build should solve it. – Manoj Apr 03 '20 at 14:07

0 Answers0