bower install

时间:2016-01-09 06:06:39

标签: bower bamboo

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

bower install

但这给了我一条错误消息,说明boor.json文件丢失了(抱歉,我手头没有确切的错误消息文本)。凉亭文件肯定是项目的根目录。 接下来我将命令更改为:

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

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

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

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