OpenVidu / cordova-plugin-android-enumeratedevices

Cordova Android plugin exposing the audio and video devices connected
Apache License 2.0
3 stars 7 forks source link

Unable to install plugin #3

Open rgustavsson opened 4 years ago

rgustavsson commented 4 years ago

When I try to install this plugin I get this issue:

> cordova prepare ios
Discovered plugin "cordova-plugin-android-enumeratedevices". Adding it to the project
Failed to restore plugin "cordova-plugin-android-enumeratedevices". You might need to try adding it again. Error: CordovaError: Failed to fetch plugin github:OpenVidu/cordova-plugin-android-enumeratedevices via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: CordovaError: Could not determine package name from output:
removed 1 package, and audited 1754 packages in 11s

This is my ionic info

Ionic:

   Ionic CLI                     : 6.12.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.2.1
   @angular-devkit/build-angular : 0.901.8
   @angular-devkit/schematics    : 9.1.8
   @angular/cli                  : 9.1.8
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 23 other plugins)

Utility:

   cordova-res (update available: 0.15.2) : 0.15.1
   native-run                             : 1.2.2

System:

   ios-deploy : 1.10.0
   ios-sim    : 8.0.2
   NodeJS     : v15.1.0 (/usr/local/Cellar/node/15.1.0/bin/node)
   npm        : 7.0.8
   OS         : macOS Catalina
   Xcode      : Xcode 12.1 Build version 12A7403
rgustavsson commented 4 years ago

I have recently updated my environment to cordova cli 10.0.0, not sure if thats the reason, will try to downgrade

rgustavsson commented 4 years ago

It's possible to install the plugin with Cordova CLI 8.0.0

rgustavsson commented 4 years ago

oh my, and the popular firebasex plugin requires cordova 9 and above @CSantosM do you have any clue to why I get the "Could not determine package name from output:" error while installning? I'll try to find a workaround but appreciate all input I can get..

CSantosM commented 4 years ago

Hi @rgustavsson , try to clean your platforms and plugin and reinstall it. Maybe the plugins have something cached.

By the way, this plugin is only available in Android, for iOS it is unnecessary so you could remove it without problems.

Regards

rgustavsson commented 4 years ago

Hello @CSantosM Yes I clean (delete) node_modules, platforms and plugins folders every time I build. In package.json the url to this plugin, git+https://github.com/OpenVidu/cordova-plugin-android-enumeratedevices.git gets rewritten to github:OpenVidu/cordova-plugin-android-enumeratedevices by either npm or cordova (guessing cordova) and so something may have changed in how packages from outside the npm registry are handled. I'm just guessing here since it's been working fine until now. A workaround is indeed to remove it when I build for iOS but then I need to remember to put it back so that I include it when I build for android.

I think this issue is related to what I am seeing: https://github.com/OpenVidu/cordova-plugin-android-enumeratedevices/issues/2

I guess I will have to continue to investigate cordova internals to understand why I am having these issues. Thanks for answering.

rgustavsson commented 3 years ago

Okey so the issue was with npm 7+ I downgraded to 6.X and now the build works again :)