opentok / cordova-plugin-opentok

Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
MIT License
30 stars 80 forks source link

Cordova 9 fail install #165

Open phyr0s opened 5 years ago

phyr0s commented 5 years ago

Cordova plugin add --> Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

phyr0s commented 5 years ago

--> https://github.com/apache/cordova/issues/85

GuillermoLovotrico commented 5 years ago

Same problem. Only for iOS «Installing "cordova-plugin-opentok" for ios Failed to install 'cordova-plugin-opentok': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it."»

9.0.0 (cordova-lib@9.0.1) "cordova-android": "^7.0.0", "cordova-ios": "^5.0.1", "cordova-plugin-opentok": "^3.4.3", "cordova-plugin-whitelist": "^1.3.3"

tusharvikky commented 5 years ago

Any update on this? Cannot even get it installed.

mmubasher commented 5 years ago

Have you installed npm modules before cordova build using npm install? also is your environment as per following

cordova-android Version Supported Android API-Levels Equivalent Android Version
8.X.X 19 - 28 4.4 - 9.0.0
7.X.X 19 - 27 4.4 - 8.1
6.X.X 16 - 26 4.1 - 8.0.0
5.X.X 14 - 23 4.0 - 6.0.1
4.1.X 14 - 22 4.0 - 5.1
4.0.X 10 - 22 2.3.3 - 5.1
3.7.X 10 - 21 2.3.3 - 5.0.2

see Android Platform Guide -Requirements and Support

tusharvikky commented 5 years ago

Yes, I tried ionic repair and then installed the plugin. Any recommendation would be great!

And yes, environment is as per the list.

mmubasher commented 5 years ago

Please mention your ionic info output in project directory @tusharvikky

tusharvikky commented 5 years ago

@mmubasher Here. I was able to get it running on Android. However, iOS is still hard to debug. All I see is a white screen on app boot.

➜ ionic info

Ionic:

   Ionic CLI                     : 5.2.2 (/Users/tushardeo/.nvm/versions/node/v10.10.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 16 other plugins)

Utility:

   cordova-res : 0.3.0 (update available: 0.6.0)
   native-run  : 0.2.4 (update available: 0.2.8)

System:

   Android SDK Tools : 26.1.1 (/Users/tushardeo/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.10.0 (/Users/tushardeo/.nvm/versions/node/v10.10.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001

  ─────────────────────────────────────

     Update available: 5.2.2 → 5.2.3
      Run npm i -g ionic to update

  ─────────────────────────────────────

Following error message while trying to add ios platform.

Installing "cordova-plugin-ionic-keyboard" for ios
Installing "cordova-plugin-ionic-webview" for ios
Installing "cordova-plugin-opentok" for ios
Failed to install 'cordova-plugin-opentok': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (/Users/tushardeo/.nvm/versions/node/v10.10.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
    at module.exports (/Users/tushardeo/Sites/geekCIonic/plugins/cordova-plugin-opentok/scripts/downloadiOSSDK.js:7:21)
    at runScriptViaModuleLoader (/Users/tushardeo/.nvm/versions/node/v10.10.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/Users/tushardeo/.nvm/versions/node/v10.10.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /Users/tushardeo/.nvm/versions/node/v10.10.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at process._tickCallback (internal/process/next_tick.js:68:7)
Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running subprocess cordova.

        cordova platform add ios exited with exit code 1.

        Re-running this command with the --verbose flag may provide more
mmubasher commented 5 years ago

have you tried ionic cordova build ios after removing folders platform and plugins. This issue however does not relates to Opentok plugin

tusharvikky commented 5 years ago

Yes. I have also tried out.

image

levidavidmurray commented 5 years ago

Only solution that worked for me was rolling Cordova back to version 8.1.2

yarn global add cordova@8.1.2 or npm install -g cordova@8.1.2

dopplerDistortion commented 5 years ago

Pull request sent for Cordova 9 fixes