2015-08-24 73 views
1

我使用ember-cli v1.13.8創建了一個全新的項目。Ember-CLI無法解析Ember 2.0

我創建了一個新項目,然後調整了Ember 2.0的bower.json文件(它目前配置爲Ember 1.13.8)。我收到以下錯誤後運行bower install [email protected]

bower ember-data#2.0.0   cached https://github.com/components/ember-data.git#2.0.0 
bower ember-data#2.0.0  validate 2.0.0 against https://github.com/components/ember-data.git#2.0.0 
bower      ENOTFOUND Package [email protected] not found 

我也試過bower install ember#2.0.0並收到此錯誤(子訊息張貼在這裏):

bower ember#2.0.0    extract archive.tar.gz 
bower ember#2.0.0    extract archive.tar.gz 
bower ember#2.0.0   invalid-meta ember is missing "ignore" entry in bower. json 
bower ember#2.0.0    resolved https://github.com/components/ember.git#2 .0.0 
bower ember#2.0.0   invalid-meta ember is missing "ignore" entry in bower. json 
bower ember#2.0.0    resolved https://github.com/components/ember.git#2 .0.0 
bower      ECONFLICT Unable to find suitable version for ember 

任何想法有什麼不對我的配置?這是令人失望的,這是開箱即用的。

安德魯

這裏是我的配置文件....

package.xml中

{ 
     "name": "ars-app", 
     "version": "0.0.0", 
     "description": "Small description for ars-app goes here", 
     "private": true, 
     "directories": { 
     "doc": "doc", 
     "test": "tests" 
     }, 
     "scripts": { 
     "build": "ember build", 
     "start": "ember server", 
     "test": "ember test" 
     }, 
     "repository": "", 
     "engines": { 
     "node": ">= 0.10.0" 
     }, 
     "author": "", 
     "license": "MIT", 
     "devDependencies": { 
     "broccoli-asset-rev": "^2.1.2", 
     "ember-cli": "1.13.8", 
     "ember-cli-app-version": "0.5.0", 
     "ember-cli-babel": "^5.1.3", 
     "ember-cli-content-security-policy": "0.4.0", 
     "ember-cli-dependency-checker": "^1.0.1", 
     "ember-cli-htmlbars": "0.7.9", 
     "ember-cli-htmlbars-inline-precompile": "^0.2.0", 
     "ember-cli-ic-ajax": "0.2.1", 
     "ember-cli-inject-live-reload": "^1.3.1", 
     "ember-cli-qunit": "^1.0.0", 
     "ember-cli-release": "0.2.3", 
     "ember-cli-sri": "^1.0.3", 
     "ember-cli-uglify": "^1.2.0", 
     "ember-data": "2.0.0", 
     "ember-disable-proxy-controllers": "^1.0.0", 
     "ember-export-application-global": "^1.0.3" 
     } 
    } 

bower.json

{ 
    "name": "ars-app", 
    "dependencies": { 
    "ember": "2.0.0", 
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4", 
    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", 
    "ember-data": "2.0.0", 
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5", 
    "ember-qunit": "0.4.9", 
    "ember-qunit-notifications": "0.0.7", 
    "ember-resolver": "~0.1.18", 
    "jquery": "^1.11.3", 
    "loader.js": "ember-cli/loader.js#3.2.1", 
    "qunit": "~1.18.0" 
    } 
} 

下面是運行bower info ember

結果
$ bower info ember 
bower ember#*     cached https://github.com/components/ember.git#2.0.1 
bower ember#*     validate 2.0.1 against https://github.com/components/ember.git#* 

{ 
    name: 'ember', 
    version: '2.0.1', 
    main: [ 
    './ember.debug.js', 
    './ember-template-compiler.js' 
    ], 
    dependencies: { 
    jquery: '>= 1.7.0 < 2.2.0' 
    }, 
    homepage: 'https://github.com/components/ember' 
} 

Available versions: 
    - 2.1.0-beta.2 
    - 2.1.0-beta.1 
    - 2.0.1 
    - 2.0.0 
    - 2.0.0-beta.5 
    - 2.0.0-beta.4 
    - 2.0.0-beta.3 
    - 2.0.0-beta.2 
    - 2.0.0-beta.1 
    - 1.13.9 
    - 1.13.8 
    - 1.13.7 
    - 1.13.6 
    - 1.13.5 
    - 1.13.4 
    - 1.13.3 
    - 1.13.2 
    - 1.13.1 
    - 1.13.0 
    - 1.13.0-beta.2 
    - 1.13.0-beta.1 
    - 1.12.1 
    - 1.12.0 
    - 1.12.0-beta.3 
    - 1.12.0-beta.2 
    - 1.12.0-beta.1 
    - 1.11.3 
    - 1.11.2 
    - 1.11.1 
    - 1.11.0 
    - 1.11.0-beta.5 
    - 1.11.0-beta.4 
    - 1.11.0-beta.3 
    - 1.11.0-beta.2 
    - 1.11.0-beta.1 
    - 1.10.1 
    - 1.10.0 
    - 1.10.0-beta.4 
    - 1.10.0-beta.3 
    - 1.10.0-beta.2 
    - 1.10.0-beta.1 
    - 1.9.1 
    - 1.9.0 
    - 1.9.0-beta.4 
    - 1.9.0-beta.3 
    - 1.9.0-beta.1 
    - 1.8.1 
    - 1.8.0 
    - 1.8.0-beta.5 
    - 1.8.0-beta.4 
    - 1.8.0-beta.3 
    - 1.8.0-beta.2 
    - 1.8.0-beta.1 
    - 1.7.1 
    - 1.7.0 
    - 1.7.0-beta.5 
    - 1.7.0-beta.4 
    - 1.7.0-beta.3 
    - 1.7.0-beta.2 
    - 1.7.0-beta.1 
    - 1.6.1 
    - 1.6.0 
    - 1.6.0-beta.5 
    - 1.6.0-beta.4 
    - 1.6.0-beta.3 
    - 1.6.0-beta.2 
    - 1.6.0-beta.1 
    - 1.5.1 
    - 1.5.0 
    - 1.5.0-beta.4 
    - 1.5.0-beta.3 
    - 1.5.0-beta.2 
    - 1.5.0-beta.1 
    - 1.4.0 
    - 1.4.0-beta.6 
    - 1.4.0-beta.5 
    - 1.4.0-beta.4 
    - 1.4.0-beta.3 
    - 1.4.0-beta.2 
    - 1.4.0-beta.1 
    - 1.3.2 
    - 1.3.1 
    - 1.3.0 
    - 1.3.0-beta.4 
    - 1.3.0-beta.3 
    - 1.3.0-beta.2 
    - 1.3.0-beta.1 
    - 1.2.2 
    - 1.2.1 
    - 1.2.0 
    - 1.2.0-beta.4 
    - 1.2.0-beta.3 
    - 1.2.0-beta.2 
    - 1.2.0-beta.1 
    - 1.1.3 
    - 1.1.2 
    - 1.1.1 
    - 1.1.0 
    - 1.1.0-beta.4 
    - 1.1.0-beta.2 
    - 1.1.0-beta.1 
    - 1.0.1 
    - 1.0.0 
    - 1.0.0-rc.8 
    - 1.0.0-rc.7 
    - 1.0.0-rc.6.1 
    - 1.0.0-rc.6 
    - 1.0.0-rc.5 
    - 1.0.0-rc.4 
    - 1.0.0-rc.3 
    - 1.0.0-rc.2 
    - 1.0.0-rc.1 
    - 1.0.0-pre.4 
    - 1.0.0-pre.2 
    - 1.0.0-pre 

更新:刪除某些條目以查看條目之間是否存在依賴性衝突後,我發現了一些有趣的內容。如果我刪除這個單一條目"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",那麼bower能夠成功安裝ember#2.0.0。有沒有人知道與ember-load-initializer依賴關係定義的問題?它似乎是仍然在版本1.13.8(截至今天)的ember-cli的一部分。

+0

會怎麼辦'涼亭信息ember'在命令行? – Kingpin2k

+0

這個錯誤有點奇怪,它使它看起來像是你的版本中的一個隱藏空間。 – Kingpin2k

+0

您是否也試過只做一個'bower install',通常它會在遇到困惑時幫助解決? – Kingpin2k

回答

6

更新這個依賴於0.1.6版本(0.1.5自)解決了這個問題。新版本支持Ember 2.0。

"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6" 

這裏是我的全部(工作)亭子文件:

{ 
    "name": "ars-app", 
    "dependencies": { 
    "ember": "2.0.1", 
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4", 
    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", 
    "ember-data": "2.0.0", 
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6", 
    "ember-qunit": "0.4.9", 
    "ember-qunit-notifications": "0.0.7", 
    "ember-resolver": "~0.1.18", 
    "jquery": "2.1.4", 
    "loader.js": "ember-cli/loader.js#3.2.1", 
    "qunit": "~1.18.0" 
    } 
} 
+0

感謝發佈您的整個Bower文件,我不得不更新從0.0.3到0.0的ember-cli-shims。4,如果其他人有類似的問題:''ember-cli-shims:「:」ember-cli/ember-cli-shims#0.0.4「'。 – c1phr

0

在bower命令中有語法錯誤。要指定一個版本使用#:在我bower.json文件

bower install ember#2.0.0 
+0

我嘗試了您的建議並收到錯誤消息。我用完整的錯誤消息更新了我的原始帖子。 – anschoewe