I work on my cordova project on two machines: macbook and a PC. When I update plugin on one machine, nothing updates on another after pulling changes. Tracking cordova plugins with git would fix the problem, but it looks really bad. Currently I'm tracking config.xml only.
When I try to execute:
cordova plugin add cordova-plugin-my-plugin it only shows list like this:
...
skipping existing file: android-1.png
skipping existing file: android-2.png
cp: dest file already exists: /Users/user/cordova-app/plugins/cordova-plugin-my-plugin/LICENSE
cp: dest file already exists: /Users/user/cordova-app/plugins/cordova-plugin-my-plugin/README.md
...
So it ends up with a donkey work for every plugin:
cordova plugin rm cordova-plugin-my-plugincordova plugin add [email protected]Does anyone had and solved this problem?
Use cordova plugin add [email protected] --save - this will put the plugin npm name (or local path, or url) along with version into the config.xml.
And then cordova prepare will restore the plugin at the saved version.
See https://cordova.apache.org/docs/en/6.x/platform_plugin_versioning_ref/index.html#saving-plugins for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With