Search code examples
cordovavisual-studio-cordovataco

TACO installs and uses Cordova 6.0.0 when 5.4.1 is required


When building a Cordova app using Gulp, the TACO tools now install and use Cordova 6.0.0 rather than the required 5.4.1. This started to occur as soon as Cordova 6.0.0 was released in late January.

My taco.json file specifies 5.4.1 as the version of Cordova to use.

{
  "cordova-cli": "5.4.1"
}

When building in Visual Studio 2015, Cordova 5.4.1 is correctly installed and used.

The problem only occurs when building on the command line or from our Jenkins server, both of which use gulp to build. All of our automated builds started to fail after Cordova 6.0.0 was released.

My package.json references the latest version of gulp and taco-team-build.

{
  "devDependencies": {
    "gulp": "latest",
    "gulp-typescript": "latest",
    "gulp-sourcemaps": "latest",
    "gulp-less": "latest",
    "gulp-cssmin": "latest",
    "gulp-rename": "latest",
    "gulp-file": "latest",
    "semver": "latest",
    "del": "latest",
    "gulp-bump": "latest",
    "gulp-cheerio": "latest",
    "run-sequence": "latest",
    "yargs": "latest",
    "taco-team-build": "latest",
    "browser-sync": "~2.11.1"
  }
}

How can I force the build to use 5.4.1? Is this a problem with taco-team-build?


Solution

  • Strange. Try setting CORDOVA_DEFAULT_VERSION or using the configure() method to set the Cordova version and see if you get a different result.

    It is possible gulp is not able to find taco.json. Edge is the default if nothing is passed into the config method, no taco.json is found, and no CORDOVA_DEFAULT_VERSION env var is found. 6.0.0 was recently released, so it's possible this was an issue for you before but 5.4.1 was simply the latest version at that time.

    Are you executing gulp from the Cordova project folder or somewhere else?

    EDIT: We may have found a bug here. Reactivating your bug to fix for taco.json. See https://github.com/Microsoft/taco-team-build/issues/18

    Use CORDOVA_DEFAULT_VERSION or the config method as a near term workaround.