安装Ember数据 - 被凉亭选项搞糊涂了

时间:2015-05-06 10:49:17

标签: ember.js ember-data bower ember-cli

这些是我在运行bower install ember-data --save时获得的选项:

bower cached        git://github.com/components/ember-data.git#0.0.14
bower validate      0.0.14 against git://github.com/components/ember-data.git#*
bower cached        git://github.com/components/ember.git#1.0.1
bower validate      1.0.1 against git://github.com/components/ember.git#~1.0.0
bower cached        git://github.com/components/ember.git#1.11.3
bower validate      1.11.3 against git://github.com/components/ember.git#>= 1.8.1 < 2.0.0
bower cached        git://github.com/components/ember.git#1.11.3
bower validate      1.11.3 against git://github.com/components/ember.git#>=1.4 <2
bower cached        git://github.com/components/ember.git#1.11.3
bower validate      1.11.3 against git://github.com/components/ember.git#> 1.5.0-beta.3
bower cached        git://github.com/components/handlebars.js.git#1.3.0
bower validate      1.3.0 against git://github.com/components/handlebars.js.git#>= 1.0.0 < 2.0

Unable to find a suitable version for ember, please choose one:
    1) ember#~1.0.0 which resolved to 1.0.1 and is required by ember-data#0.0.14 
    2) ember#1.11.1 which resolved to 1.11.1 and is required by live 
    3) ember#>= 1.8.1 < 2.0.0 which resolved to 1.11.3 and is required by ember-data#1.0.0-beta.16.1 
    4) ember#>=1.4 <2 which resolved to 1.11.3 and is required by ember-cli-shims#0.0.3 
    5) ember#> 1.5.0-beta.3 which resolved to 1.11.3 and is required by ember-resolver#0.1.15Prefix the choice with ! to persist it to bower.json

我如何知道当前设置的哪一个是正确的?

1 个答案:

答案 0 :(得分:0)

我认为您遇到的问题是您正在尝试安装非常旧版本的Ember-Data(例如2年以上)。它与最新版本的Ember完全不兼容。 (我很惊讶它与1.0.0兼容。)bower的最新版本(编写本文时)是1.0.0-beta.16.1。我会尝试安装该版本。

如果您的应用是为Ember-Data 0.14编写的,那么您将需要尽快升级。它可能不会很简单,因为从那时起已经发生了很多变化,但0.14现在已经过时而且已经过时而且在这个时候真的很有用。当然太旧了,无法与Ember CLI一起使用。