【问题标题】:bamboo build fails on bower install竹子构建在凉亭安装时失败
【发布时间】:2016-04-13 22:02:13
【问题描述】:

我是 CI/bamboo 的新手,我正在尝试为平均堆栈应用程序(角度全堆栈生成器)运行竹子构建作业。我正在通过竹脚本任务运行凉亭。 最初我使用命令:

bower install

但这给了我一条错误消息,指出缺少 bower.json 文件(抱歉,我手头没有确切的错误消息文本)。 bower 文件肯定在项目的根目录中。 接下来我将命令更改为:

bower install bower.json

我相信这会告诉 bower 在项目根目录中使用 bower.json 文件。 这成功地启动了凉亭安装,但它失败了,进而导致竹子构建工作失败。日志中出现以下内容:

07-Jan-2016 14:52:52    bower polymer#~0.5.4             invalid-meta polymer is missing "main" entry in bower.json
07-Jan-2016 14:52:52    bower polymer#~0.5.4             invalid-meta polymer is missing "ignore" entry in bower.json
07-Jan-2016 14:52:52    bower polymer#~0.5.4                 resolved https://github.com/Polymer/polymer.git#0.5.6
07-Jan-2016 14:52:52    bower webcomponentsjs#^0.6.0       not-cached https://github.com/Polymer/webcomponentsjs.git#^0.6.0
07-Jan-2016 14:52:52    bower webcomponentsjs#^0.6.0          resolve https://github.com/Polymer/webcomponentsjs.git#^0.6.0
07-Jan-2016 14:52:52    bower core-component-page#^0.5     not-cached https://github.com/Polymer/core-component-page.git#^0.5
07-Jan-2016 14:52:52    bower core-component-page#^0.5        resolve https://github.com/Polymer/core-component-page.git#^0.5
07-Jan-2016 14:52:52    bower webcomponentsjs#^0.6.0         download https://github.com/Polymer/webcomponentsjs/archive/v0.6.3.tar.gz
07-Jan-2016 14:52:53    bower webcomponentsjs#~0.5.4          extract archive.tar.gz
07-Jan-2016 14:52:53    bower webcomponentsjs#~0.5.4         resolved https://github.com/Polymer/webcomponentsjs.git#0.5.5
07-Jan-2016 14:52:53    bower core-component-page#^0.5       download https://github.com/Polymer/core-component-page/archive/0.5.6.tar.gz
07-Jan-2016 14:52:56    bower core-component-page#^0.5        extract archive.tar.gz
07-Jan-2016 14:52:56    bower webcomponentsjs#^0.6.0          extract archive.tar.gz
07-Jan-2016 14:52:56    bower core-component-page#^0.5   invalid-meta core-component-page is missing "main" entry in bower.json
07-Jan-2016 14:52:56    bower core-component-page#^0.5   invalid-meta core-component-page is missing "ignore" entry in bower.json
07-Jan-2016 14:52:56    bower core-component-page#^0.5       resolved https://github.com/Polymer/core-component-page.git#0.5.6
07-Jan-2016 14:52:56    bower webcomponentsjs#^0.6.0         mismatch Version declared in the json (0.6.1) is different than the resolved one (0.6.3)
07-Jan-2016 14:52:56    bower webcomponentsjs#^0.6.0         resolved https://github.com/Polymer/webcomponentsjs.git#0.6.3
07-Jan-2016 14:52:56    bower                               ECONFLICT Unable to find suitable version for webcomponentsjs

服务器是 Ubuntu(抱歉没有版本),bower 是 1.7.1 版

这是 bower.json 文件:

bower.json:
 {
  "name": "my-app",
  "version": "0.0.0",
  "dependencies": {
    "angular": ">=1.2.*",
    "json3": "~3.3.1",
    "es5-shim": "~3.0.1",
    "bootstrap-sass-official": "~3.1.1",
    "bootstrap": "~3.1.1",
    "angular-resource": ">=1.2.*",
    "angular-cookies": ">=1.2.*",
    "angular-sanitize": ">=1.2.*",
    "angular-route": ">=1.2.*",
    "font-awesome": ">=4.1.0",
    "lodash": "~2.4.1",
    "select2": "~4.0.1"
  },
  "devDependencies": {
    "angular-mocks": ">=1.2.*",
    "angular-scenario": ">=1.2.*"
  }
}

该项目有一个 .bowerrc 文件:

.bowerrc:
{
    "directory": "client/bower_components"
}

我尝试通过运行“bower install”在我的家用电脑(Ubuntu Ubuntu 14.04.3 LTS 和 bower 1.7.1)上模拟 bower 任务,它运行没有问题。但是,如果我在命令“bower install bower.json”中指定 bower.json 文件,则会收到以下提示:

Unable to find a suitable version for webcomponentsjs, please choose one:
    1) webcomponentsjs#~0.5.4 which resolved to 0.5.5 and is required by App States#0.6.9
    2) webcomponentsjs#* which resolved to 0.5.5 and is required by core-component-page#0.5.6
    3) webcomponentsjs#^0.6.0 which resolved to 0.6.3 and is required by polymer#0.5.6

不确定这种行为是否与竹子问题有关。

有什么想法吗?

【问题讨论】:

  • 我给了你答案;成功了吗?

标签: bower bamboo


【解决方案1】:

bower.json 中明确指定冲突webcomponentsjs 的版本。虽然 bower 可以询问您在从交互式 shell 运行时使用哪个依赖项,但在 Bamboo 上运行任务时显然不可能。

【讨论】:

    猜你喜欢
    • 2014-10-15
    • 1970-01-01
    • 2013-10-31
    • 2014-09-16
    • 2017-03-18
    • 1970-01-01
    • 2014-11-02
    • 2013-07-03
    • 2014-02-09
    相关资源
    最近更新 更多