question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cordova 9.0.0 plugin add not saving to config.xml

See original GitHub issue

Bug 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
globules-iocommented, Dec 13, 2019

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.

1reaction
dpoguecommented, Sep 24, 2020

will all those settings remain in config.xml and only plugins moving to package.json ?

Yes, only the dependencies (plugin and platform versions) are moving to package.json. All your app configuration continues to live in config.xml.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found