Package.json dependencies plugins

Why does Ionic add any installed plugins to the dependencies section of the package.json file? I am primarily building on Windows for android, and when I try to replicate the project in MacOs I am unable to run npm install or cordova prepare, because messages like ‘com.synconset.imagepicker’ is not in the npm registry’.
Anyone having same problems or am I doing something wrong?

cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.9.1
ionic (Ionic CLI) : 3.9.1
global packages:
Cordova CLI : 7.0.1

local packages:
@ionic/app-scripts : not installed
Cordova Platforms : none
Ionic Framework : not installed
System:
ios-deploy : 1.9.0
Node : v6.11.2
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b

Cordova CLI 7.x is doing that, which is used by Ionic CLI. They are switching over to using npm for their package distribution as it is more or less standard now. In Cordova 8 the old stuff will probably be removed.

If plugins are giving you trouble, they are actually broken and using wrong package IDs in their files.

1 Like

Thanks for your reply, but this is happening to me with plugins from the Ionic Native package, is it possible that they are broken? In that case I would expect more people to encounter the same issue but I have found no trace of it online.

Yes, Ionic Native is just a wrapper for random plugins someone wanted to use. Even the Ionic Native code is community powered, and the Cordova plugins often change and break stuff all by themselves.

Cordova 7 is also not that old, many people are still using Cordova 6.5.

If you have specific problems with some plugins, maybe tell us about them and add links to the Ionic Native wrapper and the Cordova plugin themselves. A good solution is often to just install it again.

Ok, thanks a lot for your explanation. I will write down the ones causing troubles next time I encounter it.

1 Like