Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install plugin #3

Open
rgustavsson opened this issue Nov 6, 2020 · 6 comments
Open

Unable to install plugin #3

rgustavsson opened this issue Nov 6, 2020 · 6 comments

Comments

@rgustavsson
Copy link

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
Copy link
Author

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

@rgustavsson
Copy link
Author

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

@rgustavsson
Copy link
Author

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
Copy link
Member

CSantosM commented Nov 9, 2020

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
Copy link
Author

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:
#2

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

@rgustavsson
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants