当Bower说“无法找到合适的版本”时,Bower的意思是什么?

时间:2014-04-14 17:47:06

标签: angularjs bower

当它说"找不到适合角度的版本时,它是什么意思"?在我的bower.json中,我指定了1.2.6作为角度版本。为什么我在这里有6个选择,其中5个可能导致我的项目停止工作?

Unable to find a suitable version for angular, please choose one:
    1) angular#1.2.6 which resolved to 1.2.6 and is required by angular-scenario#1.2.6 
    2) angular#1.2.15 which resolved to 1.2.15 and is required by angled-horizon 
    3) angular#1.2.16 which resolved to 1.2.16 and is required by angular-animate#1.2.16 
    4) angular#>= 1.0.2 which resolved to 1.2.16 and is required by angular-ui-utils#0.1.1 
    5) angular#>=1 which resolved to 1.2.16 and is required by angular-bootstrap#0.10.0 
    6) angular#~1.2.10 which resolved to 1.2.16 and is required by angular-strap#2.0.1

此外,如果我使用!将其持久保存到bower.json会怎样?

如果有帮助的话,这是我的bower.json:

{
  "name": "angled-horizon",
  "version": "0.0.0",
  "dependencies": {
    "angular": "1.2.15",
    "json3": "3.2.6",
    "es5-shim": "2.1.0",
    "jquery": "1.10.2",
    "sass-bootstrap": "3.0.2",
    "angular-resource": "1.2.6",
    "angular-cookies": "1.2.6",
    "angular-sanitize": "1.2.6",
    "angular-route": "1.2.6",
    "angular-ui-utils": "0.1.1",
    "angular-animate": "1.2.6",
    "angular-bootstrap": "0.10.0"
  },
  "devDependencies": {
    "angular-mocks": "1.2.6",
    "angular-scenario": "1.2.6",
    "angular-ui-utils": "0.1.1"
  },
  "resolutions": {
    "angular": "1.2.15"
  }
}

1 个答案:

答案 0 :(得分:14)

我在互联网上找到了answer

您可以查看一下,他们建议添加分辨率

"resolutions": {
    "angular": "1.2.0-rc.2"
  }