cordova 9.0.0 plugin add not saving to config.xml
See original GitHub issueBug Report
Problem
What is expected to happen?
config.xml to be added <plugin name="cordova-plugin-whatever" spec="^1.0.0" />
What does actually happen?
config.xml not updated
Information
After doing cordova plugin add cordova-plugin-whatever
the plugin is added to the project and builds properly but the config.xml at root of project is not updated (it is not plugin dependent, hence “whatever”)
Command or Code
cordova plugin add cordova-plugin-whatever
Environment, Platform, Device
cordova-lib 9.0.0 cordova-android 7.1.4 windows 10
Checklist
- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top Results From Across the Web
android - Cordova CLI - not updating config.xml - Stack Overflow
I am making sure --save is used in the commands (which I gather is not even required anymore). When I run a cordova...
Read more >Config.xml - Apache Cordova
This element is added to config.xml when a plugin that uses CLI variables is added using the --save flag. See the CLI reference...
Read more >cordova-plugin-firebase-lib - npm
Confirm your Cordova environment versions · For cordova-cli & cordova-lib , run cordova -v . It should be something like: 9.0.0 (cordova-lib@9.0.
Read more >Volt builder errors - AppStudio
Output: No version supplied. Retrieving version from config.xml... Grabbing pinned version. Using cordova-fetch for cordova-android@^9.0.0 ...
Read more >Failing to add cordova plugin from Github - Builds
Discovered plugin "cordova-plugin-file-transfer". Adding it to the project Failed to fetch plugin github:apache/cordova-plugin-file-transfer via registry.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let me vocalize my opinion on this change again. This is a very bad design. Both files should be kept in sync, or one file should go. As a matter of fact, package.json is a NPM thing, where config.xml is a Cordova thing. I don’t see the point AT ALL to merge these 2 files. Whoever made that “design” needs to reconsider his/her involvement in this scale of a projects.
Yes, only the dependencies (plugin and platform versions) are moving to package.json. All your app configuration continues to live in config.xml.