Open shabah1975 opened 6 years ago
I have the same issue, but it seems to work fine when forcing it to use version 5 of the file plugin, as suggested.
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: https://github.com/terikon/cordova-plugin-photo-library/issues/104 and this one: https://github.com/terikon/cordova-plugin-photo-library/issues/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
+1 please update so it uses 5.0.0, Having a conflict with another plugin that does use 5.0.0
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?
I'm also having this problem, anyone found a way to fix it?
@rodrigoreal You can try --force when installing the plugin and then when you get problems with swift, try: https://github.com/terikon/cordova-plugin-photo-library/issues/112
@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
@RHinderiks Even I have the same issue. Did you find any fix?
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
Solution from @bwdrop didn't work for me
Solution from @bwdrop works for me :+1:
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.
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)
global packages:
local packages:
System:
Environment Variables:
Misc:
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.