Search code examples
javascriptandroidcordovaionic-frameworklive-connect-sdk

Error on Android during ConnectSDK installation


I integrated the ConnectSDK Cordova Plugin into my Ionic App. https://github.com/ConnectSDK/Connect-SDK-Cordova-Plugin

During the Installation I got an error for the Android Platform:

Failed to install 'cordova-plugin-connectsdk': Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.<anonymous>:18:20
at Object.<anonymous> (/Users/username/desktop/app/plugins/cordova-plugin-connectsdk/scripts/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
Error: Cannot find module 'internal/fs'

On iOS the installation worked perfectly fine.

cordova -v 7.0.1

npm -v 5.2.0

node -v v7.9.0


Solution

  • I fixed this issue.

    I used the node 6 version via the nvm command and added the android platform on version 5.2.2. And everything worked perfectly fine.