Error: Can not add any plugin

Good afternoon.
When I try to add a plugin like ‘phonegap-plugin-push’ , I get the following error message:
‘Error: Variable(s) missing (use: --variable SENDER_ID=value)’

This started to happen after I updated the Cordova to the latest version
is there something i can do ? or should i rollback the Cordova ?

What command are you entering to add a plugin? And could you share which versions of ionic/cordova you’re using?

1 Like

sorry forgot to type the command
it is "cordova plugin add PLUGIN_NAME"
but is working now , i removed the android platform and added back

I am facing the same problem now, I used the following command to add plugin. Any idea?

cordova plugin add https://github.com/phonegap/phonegap-plugin-push

Did you follow the installation instructions over here? Because you have to add some variables with that plugin as well… If it doesn’t work well for you, you can use the ngCordova wrappers with the pushPlugin, documented here.

This plugin requires a variable to installation , this variable is the authentication token from GCM

Example:
phonegap plugin add phonegap-plugin-push --variable SENDER_ID=“XXXXXXX”

Thank you so much guys, its working now. I used the below command

phonegap plugin add phonegap-plugin-push --variable SENDER_ID=“XXXXXXX”

Thanks :slight_smile:

1 Like