ImagePicker: "com.synconset.imagepicker" incorrectly adding to package.json dependencies
When using this plugin with Ionic (as per http://ionicframework.com/docs/native/image-picker/) it’s breaking.
After running ionic cordova plugin add cordova-plugin-telerik-imagepicker and npm install --save @ionic-native/image-picker everything seems fine.
But when you then go to use ionic cordova run or ionic cordova build a reference to "com.synconset.imagepicker" is inserted into the package.json dependencies list. This is not a valid node module name, so it fails the next time npm install is run.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 13
- Comments: 28
@azeemse Yes, the only way I found is just about android package version, you need to downgrade at android 6.3.0.
Here are my notes on this subject (you don’t need to do it for ios if you don’t have any problem):
Check versions (see /config.xml or command “$ ionic info”):
Steps:
Run prepare command:
$ ionic cordova prepareReinstall platforms:
On IOS platform, The GoogleService-Info.plist file can be wrong: => copy this file: /platform/ios/MyApp/Resources/GoogleService-Info.plist => paste and replace this one: /platform/ios/MyApp/Resources/Resources/GoogleService-Info.plist
IOS again, check the “value” attributes in config files (iTunes Connect will refuse the package without it) :
– config.xml
– package.json
It’s a big waste of time, for sure.
I found a workaround by removing the single line
"com.synconset.imagepicker": "~2.1.8"from package.json. And"com.synconset.imagepicker": { "PHOTO_LIBRARY_USAGE_DESCRIPTION": "Add multiple photos" }shows warning while execute the commands like: cordova platform add android and cordova run android. It worked for me. But we need to inform this to ionic team, i believe it’s a bug.If so then at least Ionic should update their documentation with some verified image picker. They are still using the Telerik image picker in their docs.
https://ionicframework.com/docs/native/image-picker/
@qw1210p Was the same workaround commented by @2010abinas .
It worked for me, but I think not be the best solution.
Hi guys, follow the infos here, no need to downgrade cordova. It works on 7.1.0 Cordova hook for Manifest.xml
in Ionic2 if you are using any existing project and you do
npm install, after that time just remove thecom.synconset.imagepickerplugin from package.json and config.json as well. Because thecom.synconset.imagepickeris not present in npm directory that’s why we get error. After doing all the set up then installcom.synconset.imagepickerplugin, it will work perfect.