我正在尝试创建一个包含“Polymer / polymer”和“Polymer / core-elements”的软件包,两者都具有特定版本0.3.5。
$ cat bower.json
{
"name": "bower-test",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.3.5",
"core-elements": "Polymer/core-elements#0.3.5"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
$ bower --version
1.3.10
当我尝试安装依赖项时,bower报告polymer
版本解析中的冲突:
$ bower install
bower not-cached git://github.com/Polymer/polymer.git#0.3.5
bower resolve git://github.com/Polymer/polymer.git#0.3.5
bower not-cached git://github.com/Polymer/core-elements.git#0.3.5
bower resolve git://github.com/Polymer/core-elements.git#0.3.5
bower download https://github.com/Polymer/core-elements/archive/0.3.5.tar.gz
bower download https://github.com/Polymer/polymer/archive/0.3.5.tar.gz
bower extract core-elements#0.3.5 archive.tar.gz
bower invalid-meta core-elements is missing "main" entry in bower.json
bower invalid-meta core-elements is missing "ignore" entry in bower.json
bower resolved git://github.com/Polymer/core-elements.git#0.3.5
bower not-cached git://github.com/Polymer/core-ajax.git#>=0.3.0 <1.0.0
bower resolve git://github.com/Polymer/core-ajax.git#>=0.3.0 <1.0.0
-------------------------- skipped -------------------------------------
bower download https://github.com/Polymer/core-ajax/archive/0.4.0.tar.gz
-------------------------- skipped -------------------------------------
bower not-cached git://github.com/Polymer/polymer.git#>=0.4.0 <1.0.0
bower resolve git://github.com/Polymer/polymer.git#>=0.4.0 <1.0.0
-------------------------- skipped -------------------------------------
bower download https://github.com/Polymer/polymer/archive/0.4.0.tar.gz
Unable to find a suitable version for polymer, please choose one:
1) polymer#>=0.3.0 <1.0.0 which resolved to 0.3.5 and is required by core-elements#0.3.5, core-layout#0.3.5
2) polymer#0.3.5 which resolved to 0.3.5 and is required by bower-test
3) polymer#>=0.4.0 <1.0.0 which resolved to 0.4.0 and is required by core-ajax#0.4.0, core-animated-pages#0.4.0, core-animation#0.4.0, core-collapse#0.4.0, core-component-page#0.4.0, core-dropdown#0.4.0, core-field#0.4.0, core-header-panel#0.4.0, core-icons#0.4.0, core-iconset#0.4.0, core-iconset-svg#0.4.0, core-input#0.4.0, core-layout-grid#0.4.0, core-layout-trbl#0.4.0, core-list#0.4.0, core-localstorage#0.4.0, core-media-query#0.4.0, core-menu-button#0.4.0, core-meta#0.4.0, core-overlay#0.4.0, core-popup-menu#0.4.0, core-range#0.4.0, core-selection#0.4.0, core-selector#0.4.0, core-shared-lib#0.4.0, core-signals#0.4.0, core-splitter#0.4.0, core-style#0.4.0, core-tooltip#0.4.0, core-transition#0.4.0, marked-element#0.4.0, prettify-element#0.4.0
如果我理解正确的话,这就是凉亭的作用:
core-elements#0.3.5
core-elements#0.3.5
取决于core-ajax#>=0.3.0
core-ajax
<{1}}的最新版本<{1}} core-ajax#0.4.0
取决于core-ajax#0.4.0
polymer#>=0.4.0
中为0.3.5
指定了确切版本polymer
。确实存在依赖项的有效配置(取bower.json
取决于core-ajax#0.3.5
),但是bower无法找到此类配置。更糟糕的是,它甚至都没有尝试过。
我做错了吗?如果没有,是否有一些解决方案?