Skip to content

NativeScript Core TypeScript in NS 7 dependency issues #5

Open

Description

@thd-fox

Hi all,

I really thank you for enabling us to integrate your chat service in a {N} app.

We develop our app in latest NativeScript version 7.1.
Also we use TypeScript and NativeScript Core.

How can we implement your SDK into this setup?
We followed your integration steps and also tried to convert your JS demo app to TS but with no success by now.

We get the following error from console:


WARNING in ../node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/Users/acme/TS-App/App-Name/node_modules/ws/lib'
 @ ../node_modules/ws/lib/buffer-util.js
 @ ../node_modules/ws/lib/websocket.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/@xmpp/websocket/lib/Socket.js
 @ ../node_modules/@xmpp/websocket/lib/Connection.js
 @ ../node_modules/@xmpp/websocket/index.js
 @ ../node_modules/@xmpp/client/react-native.js
 @ ../node_modules/nativescript-connectycube/lib/cubeDependencies.js
 @ ../node_modules/nativescript-connectycube/lib/messaging/cubeChat.js
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

WARNING in ../node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/acme/TS-App/App-Name/node_modules/ws/lib'
 @ ../node_modules/ws/lib/validation.js
 @ ../node_modules/ws/lib/receiver.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/@xmpp/websocket/lib/Socket.js
 @ ../node_modules/@xmpp/websocket/lib/Connection.js
 @ ../node_modules/@xmpp/websocket/index.js
 @ ../node_modules/@xmpp/client/react-native.js
 @ ../node_modules/nativescript-connectycube/lib/cubeDependencies.js
 @ ../node_modules/nativescript-connectycube/lib/messaging/cubeChat.js
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ../node_modules/@xmpp/resolve/lib/dns.js
Module not found: Error: Can't resolve 'dns' in '/Users/acme/TS-App/App-Name/node_modules/@xmpp/resolve/lib'
 @ ../node_modules/@xmpp/resolve/lib/dns.js 3:12-26
 @ ../node_modules/@xmpp/resolve/resolve.js
 @ ../node_modules/@xmpp/resolve/index.js
 @ ../node_modules/@xmpp/client/react-native.js
 @ ../node_modules/nativescript-connectycube/lib/cubeDependencies.js
 @ ../node_modules/nativescript-connectycube/lib/messaging/cubeChat.js
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ../node_modules/ws/lib/websocket.js
Module not found: Error: Can't resolve 'net' in '/Users/acme/TS-App/App-Name/node_modules/ws/lib'
 @ ../node_modules/ws/lib/websocket.js 6:12-26
 @ ../node_modules/ws/index.js
 @ ../node_modules/@xmpp/websocket/lib/Socket.js
 @ ../node_modules/@xmpp/websocket/lib/Connection.js
 @ ../node_modules/@xmpp/websocket/index.js
 @ ../node_modules/@xmpp/client/react-native.js
 @ ../node_modules/nativescript-connectycube/lib/cubeDependencies.js
 @ ../node_modules/nativescript-connectycube/lib/messaging/cubeChat.js
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ../node_modules/ws/lib/websocket.js
Module not found: Error: Can't resolve 'tls' in '/Users/acme/TS-App/App-Name/node_modules/ws/lib'
 @ ../node_modules/ws/lib/websocket.js 7:12-26
 @ ../node_modules/ws/index.js
 @ ../node_modules/@xmpp/websocket/lib/Socket.js
 @ ../node_modules/@xmpp/websocket/lib/Connection.js
 @ ../node_modules/@xmpp/websocket/index.js
 @ ../node_modules/@xmpp/client/react-native.js
 @ ../node_modules/nativescript-connectycube/lib/cubeDependencies.js
 @ ../node_modules/nativescript-connectycube/lib/messaging/cubeChat.js
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ../node_modules/nativescript-connectycube/lib/videocalling_conference/cubeConferenceClient.js 12:21
Module parse failed: Unexpected token (12:21)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   }
| 
>   DEVICE_INPUT_TYPES = DEVICE_INPUT_TYPES
|   CALL_TYPES = CALL_TYPES
| 
 @ ../node_modules/nativescript-connectycube/lib/cubeMain.js 46:31-88
 @ ./lib/connectycube-service.ts
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

Activity

  1. thd-fox commented on Jan 11, 2021

    @thd-fox
    Author

    Is there any support on this? If this project is dead we must find an other SDK to implement in our app...

  2. DaveLomber commented on Jan 11, 2021

    @DaveLomber
    Collaborator

    Hi @thd-fox
    apologise for the delayed reply

    The project is not dead - rather it's actively maintained

    Regarding the latest 'parse failed' issue - you should try to add '@babel/plugin-proposal-class-properties' plugin

    As for all the above issues - it seems it's related to the xmppjs lib https://github.com/xmppjs/xmpp.js, especially to its internal dependency - ws lib https://www.npmjs.com/package/ws. The current SDK uses "@xmpp/client": "0.9.2"

    By some reason, it can't find/install standard net, tls.. libs here https://github.com/websockets/ws/blob/master/lib/websocket.js#L7
    I'm not sure I see a clear reason why it can't use standard nodejs deps. Could you please also check this at your side and share the ideas if any

  3. thd-fox commented on Jan 24, 2021

    @thd-fox
    Author

    @DaveLomber thank you for your answer.

    Do you have iOS 10.* dependency?
    I tried with lower dependency. With no success.
    IPHONEOS_DEPLOYMENT_TARGET = 10.3;

    I can't fix the issues. There seems to be a TypeScript parse error.
    Multiple npm modules can not be installed or can not be found.
    I tried to install dependencies manually, but with no success.
    I even tried to rewrite npm modules, like dns to be recognized, but also with no success.

    Hope for any help.
    Our company really wold like to use your service.
    We were able to implement applozic in 1 day.
    But that one is kind a ugly and is missing multiple features.

  4. DaveLomber commented on Jan 25, 2021

    @DaveLomber
    Collaborator

    @thd-fox thanks for the details provided

    I think the best way will be to perform the upgrade of code sample to NS7 at your side
    Will try to address this week
    Will let you know once done

  5. thd-fox commented on Feb 1, 2021

    @thd-fox
    Author

    @DaveLomber I can't follow your way to give small support on NS7 compatibility. :(

    I represent an enterprise searching for a enterprise chat/video call solution and you don't support NS7 as you claim to support NS. :(

    I don't see that you spend a lot of effort in supporting NS platform. This is sad, as it seems that I can't expect a lot of support in the future once our company start enterprise plan with you.

    Please send me PN to plan a pre sales negotiation call.

  6. DaveLomber commented on Feb 1, 2021

    @DaveLomber
    Collaborator

    @thd-fox please contact [email protected] or [email protected]
    will follow up

    Thank you

  7. AlokTibrewal commented on Nov 28, 2021

    @AlokTibrewal

    I agree with @thd-fox We developed our own chat engine but we are facing few issues. Any suggestion on chat with angular is welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions