Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13949

cordova prepare doesn't install the correct plugin versions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • cordova@8.0.0
    • None
    • cordova-cli
    • Mac OS,

      Cordova 8.0.0

      npm 3.10.3

    Description

      according to the documentation at https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/#plugin-versioning plugins should install the version from either config.xml or package.json. However, the latest version is always installed instead.

      How to reproduce:

      cordova create test
      cd test
      cordova platform add android
      cordova plugin add cordova-plugin-splashscreen@4.0.0

      Note how

      cordova plugin ls

      Shows that version 4.0.0 is installed. Also config.xml and package.json both indicate that 4.0.0 is installed.

      Now delete the 'platforms' and 'plugins' folder and run

      cordova prepare

      Note how config.xml and package.json still indicate that 4.0.0 installed, however when running

      cordova plugin ls

      it shows

      cordova-plugin-splashscreen 4.1.0 "Splashscreen"
      cordova-plugin-whitelist 1.3.3 "Whitelist"

       
      perhaps I'm missing something, though my understanding is that when `cordova prepare` is run, all plugins and platforms will be installed with their version as listed in package.json and config.xml.

       

      cordova plugin rm cordova-plugin-splashscreen
      cordova plugin add cordova-plugin-splashscreen@4.0.0

      Installs the correct version again, but that kind of defeats the purpose of cordova prepare.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Jespertheend Jesper van den Ende
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: