当使用Gulp构建Cordova应用程序时,TACO工具现在安装并使用Cordova 6.0.0而不是所需的5.4.1。这是在1月底Cordova 6.0.0发行时就开始发生的。
我的taco.json文件指定5.4.1作为要使用的Cordova版本。
{
"cordova-cli": "5.4.1"
}在Visual 2015中构建时,将正确安装和使用Cordova 5.4.1。
只有在命令行上构建或从Jenkins服务器构建时才会出现问题,这两种服务器都使用gulp进行构建。在Cordova 6.0.0发布后,我们所有的自动化构建都开始失败。
我的package.json引用了gulp和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"
}
}如何强制构建使用5.4.1?这是玉米饼团队建设的问题吗?
发布于 2016-02-04 16:16:43
真奇怪。尝试设置CORDOVA_DEFAULT_VERSION或使用配置()方法设置Cordova版本,看看是否得到了不同的结果。
很可能gulp找不到taco.json。如果没有向config方法传递任何内容,没有找到taco.json,也没有找到CORDOVA_DEFAULT_VERSION env,则Edge是默认的。6.0.0是最近发布的,所以这可能是之前的问题,但5.4.1只是当时的最新版本。
您是从Cordova项目文件夹或其他地方执行gulp吗?
编辑:我们可能在这里发现了一个bug。重新激活了您的bug以修复taco.json。请参阅https://github.com/Microsoft/taco-team-build/issues/18
使用CORDOVA_DEFAULT_VERSION或config方法作为短期解决方案。
https://stackoverflow.com/questions/35189826
复制相似问题