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

Error to install plugin #111

Open
shabah1975 opened this issue Dec 26, 2017 · 12 comments
Open

Error to install plugin #111

shabah1975 opened this issue Dec 26, 2017 · 12 comments

Comments

@shabah1975
Copy link

shabah1975 commented Dec 26, 2017

My json is this:

{
"name": "aaa",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@ angular/common": "5.0.3",
"@ angular/compiler": "5.0.3",
"@ angular/compiler-cli": "5.0.3",
"@ angular/core": "5.0.3",
"@ angular/forms": "5.0.3",
"@ angular/http": "5.0.3",
"@ angular/platform-browser": "5.0.3",
"@ angular/platform-browser-dynamic": "5.0.3",
"@ ionic-native/camera": "^4.5.2",
"@ ionic-native/core": "4.4.0",
"@ ionic-native/file": "^4.5.2",
"@ ionic-native/file-path": "^4.5.2",
"@ ionic-native/file-transfer": "^4.5.2",
"@ ionic-native/photo-library": "^4.5.2",
"@ ionic-native/splash-screen": "4.4.0",
"@ ionic-native/status-bar": "4.4.0",
"@ ionic/storage": "2.1.3",
"cordova-plugin-camera": "^3.0.0",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-file": "^4.3.2",
"cordova-plugin-file-transfer": "^1.7.0",
"cordova-plugin-filepath": "^1.1.0",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-photo-library": "^2.1.0",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.6",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-camera": {},
"cordova-plugin-photo-library": {
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "Seleccionar imagenes de alumnos, profesores y eventos"
},
"cordova-plugin-file": {},
"cordova-plugin-filepath": {},
"cordova-plugin-file-transfer": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {}
},
"platforms": [
"android"
]
}
}

My info Ionic is this:

cli packages: (C:\Users\xxx\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v6.11.4
npm               : 3.10.10
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\xxx\AppData\Local\Android\sdk

Misc:

backend : pro

I get this error:

Installing "cordova-plugin-photo-library" for android

Failed to install 'cordova-plugin-photo-library': CordovaError: Version of installed plugin: "cordova-plugin-file@5.0.0" does not satisfy dependency plugin requirement "cordova-plugin-file@^4.3.2". Try --force to use installed plugin as dependency.
at C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:557:37
at _fulfilled (C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:509:49
at flush (C:\Users\scarr\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)

(node:4560) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Version of installed plugin: "cordova-plugin-file@5.0.0" does not satisfy dependency plugin requirement "cordova-plugin-file@^4.3.2". Try --force to use installed plugin as dependency.

@michaschwab
Copy link

I have the same issue, but it seems to work fine when forcing it to use version 5 of the file plugin, as suggested.

@lwiml
Copy link

lwiml commented Jan 10, 2018

I hade the same issue at first, tried forcing, thats when i got the next error:

(node:29653) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '../cordova/platform_metadata'
Related to this issue i suppose: #104
and this one: #107

An update for the dependencies would be nice :D
Using the same cordova (Cordova CLI) : 8.0.0 and cordova-plugin-file 5.0.0

@RHinderiks
Copy link

+1 please update so it uses 5.0.0, Having a conflict with another plugin that does use 5.0.0

@duncan-qabana
Copy link

Yeah, I tried to force install this. It either gives
(node:29653) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '../cordova/platform_metadata'

Or

Uncaught TypeError: Object(...) is not a function.

Is it possible to update this?

@rodrigoreal
Copy link

I'm also having this problem, anyone found a way to fix it?

@lwiml
Copy link

lwiml commented Jan 24, 2018

@rodrigoreal You can try --force when installing the plugin and then when you get problems with swift, try: #112

@RHinderiks
Copy link

@wimluiten The issue is not so much installing this version it's that other plugins also have a dependency with this plugin and you can't run multiple versions of the same dependency

@divyanshuchauhan
Copy link

@RHinderiks Even I have the same issue. Did you find any fix?

@hlnlwj
Copy link

hlnlwj commented Mar 15, 2018

About the (node:29653) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '../cordova/platform_metadata' error, it was a bug in in cordova-plugin-add-swift-support, you just need update it to its latest version (1.7.1)

cordova plugin rm cordova-plugin-add-swift-support
cordova plugin add cordova-plugin-add-swift-support

@shamilovtim
Copy link

Solution from @bwdrop didn't work for me

@FreezeSoul
Copy link

Solution from @bwdrop works for me 👍

@nocodedweb
Copy link

Solution from @bwdrop worked for me, as well. Had to force remove and add the swift-support plugin since the photo-library plugin was already installed.

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