Failed to install phonegap-plugin-push

I am following Ionic Push setup guide but I am getting an error trying to install phonegap plugin:

cordova plugin add phonegap-plugin-push --variable SENDER_ID=123456789 --save --debug

Im getting and error:

× Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova plugin add phonegap-plugin-push --variable SENDER_ID=123456789 --save
        (exit code 1):

        Error: Invalid Version: broken

this is ionic info --verbose generated following output:

[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts              : 1.1.4
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android broken
Ionic Framework                 : ionic-angular 2.2.0

System:

Node       : v6.9.1
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.8

Can anybody point me in the right direction?

Hi,

Try to install any other plugin, if you get the same error try this command from CLI

npm install -g cordova

Then

cordova plugin add phonegap-plugin-push --variable SENDER_ID=123456789 --save --verbose

Hope this helps.

That did not help. I am getting same error

Please post the whole output (and input) of your command line when you run that command, not jsut that small part.

this is the entire output of the command

Then run the same command with --verbose added at the end and post the complete input and output from the command line.

updated output. thank you

Ok, now I understand - I was talking about the initial command - not ionic info. Meh.

Run the “install plugin” command again:
ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=123456789 --save --verbose

And if this isn’t interesting:
cordova plugin add phonegap-plugin-push --variable SENDER_ID=123456789 --save --debug

(Yeah, figuring out things like that can be a pain…)

updated again. it is definetly a pain :confused:

The command and output don’t match now. Command is cordova ... but output is ionic ....