How to keep my plugins in package.json clean?

Hi guys,

In my package.json file I have the following plugins:

  "cordovaPlugins": [
      "locator": "",
      "id": "com.phonegap.plugins.PushPlugin"
      "locator": "",
      "id": "ionic-plugin-deploy"
  "cordovaPlatforms": [

As soon as I run the command ionic state reset, it adds


So these plugins are defined twice, once without and once with the version. I don’t know where this is coming from. The statusbar plugin is not even the newest one (2.1.0).

When I run ionic state reset again, I get the following error:

Error executing "cordova plugin add cordova-plugin-splashscreen":
Fetching plugin "cordova-plugin-splashscreen" via npm
Installing "cordova-plugin-splashscreen" for android
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-splashscreen':Error: Uh oh!
"/Users/user/Documents/dev/app/platforms/android/src/org/apache/cordova/splashscreen/" already exists!

It’s not always the splashscreen plugin, the error varies “randomly”.

How can I clean my package.json file, that it works again with my plugins?

Thank you very much and kind regards,

1 Like

Thanks for your answer. I managed to reset with ionic state reset multiple times without an error when I add an explicit version number to each plugin.

The strange thing is, when I add


it additionally adds


that these plugin is defined twice.

Edit: In my config.xml file a had the following line:

<plugin name="cordova-plugin-statusbar" spec="^2.1.0"/>

When changing to 2.2.0 it works as expected.

Who can explain me the difference between config.xml and package.json? :smirk:

1 Like

Any news about this. The same is happening to me, I’ve spent too much hours trying to fix it. Anyone from ionic team?