gpt4 book ai didi

angularjs - 无法找到适合 Angular - Bower 安装的版本

转载 作者:行者123 更新时间:2023-12-03 01:27:28 25 4
gpt4 key购买 nike

我已经设置了我的 Angular 应用程序,因此当它被推送到 Heroku 时,它会运行 bower install。但是,由于版本问题,我收到了错误。

当我在本地运行 bower install 时,我会看到以下内容:

Unable to find a suitable version for angular, please choose one:                                                                           
1) angular#1.2.16 which resolved to 1.2.16 and is required by angular-resource#1.2.16
2) angular#1.2.23 which resolved to 1.2.23 and is required by angular-cookies#1.2.23
3) angular#>= 1.0.8 which resolved to 1.2.25 and is required by angular-ui-router#0.2.10
4) angular#^1 which resolved to 1.2.25 and is required by angular-ui-codemirror#0.1.6
5) angular#~1.2.2 which resolved to 1.2.25 and is required by splitter#f5c2195050
6) angular#>=1.0.6 which resolved to 1.2.25 and is required by angular-elastic#2.4.0
7) angular#~1.2 which resolved to 1.2.25 and is required by angular-nanoscroller#0.2.1
8) angular#~1.2.9 which resolved to 1.2.25 and is required by angular-sockjs#0.0.1Prefix the choice with ! to persist it to bower.json

? Answer::

我该怎么办 - 由于防抖功能,我实际上需要 Angular 1.3 版本

我的 bower.json 看起来像这样:

{
"name": "myapp",
"version": "0.0.1",
"dependencies": {
"json3": "~3.3.1",
"es5-shim": "~3.1.0",
"angular-resource": "1.2.16",
"angular-sanitize": "1.2.16",
"angular-animate": "1.2.16",
"angular-ui-router": "~0.2.10",
"jquery": "~2.1.1",
"angular-ui-codemirror": "~0.1.6",
"splitter": "*",
"angular-cookies": "~1.2.23",
"angular-elastic": "~2.4.0",
"angular-local-storage": "~0.0.7",
"chance": "~0.5.6",
"nanoscroller": "~0.8.4",
"angular-nanoscroller": "~0.2.1",
"angular-sockjs": "~0.0.1"
}
}

最佳答案

将当前的 Angular 依赖关系更新为 1.3.x 并添加 Angular 分辨率以抑制提示:

{
"name": "myapp",
"version": "0.0.1",
"dependencies": {
"angular": "~1.3.x",
"angular-animate": "~1.3.x",
"angular-cookies": "~1.3.x",
"angular-resource": "~1.3.x",
"angular-sanitize": "~1.3.x",
"angular-ui-router": "~0.2.10",
"angular-ui-codemirror": "~0.1.6",
"angular-elastic": "~2.4.0",
"angular-local-storage": "~0.0.7",
"angular-nanoscroller": "~0.2.1",
"angular-sockjs": ">=0.0.1",
"json3": "~3.3.1",
"es5-shim": "~3.1.0",
"jquery": "~2.1.1",
"splitter": "*",
"chance": "~0.5.6",
"nanoscroller": "~0.8.4"
},
"resolutions": {
"angular": "~1.3.x"
}
}

关于angularjs - 无法找到适合 Angular - Bower 安装的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25915729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com