我正在尝试将 angular-ui-router 添加到我的应用程序中。
stephane@stephane-ThinkPad-X60:angular-news> bower install angular-ui-router
bower not-cached git://github.com/angular-ui/ui-router.git#master
bower resolve git://github.com/angular-ui/ui-router.git#master
bower not-cached git://github.com/firebase/firebase-bower.git#current
bower resolve git://github.com/firebase/firebase-bower.git#current
bower checkout angular-ui-router#master
bower resolved git://github.com/angular-ui/ui-router.git#8aed5dae5c
bower ENORESTARGET Tag/branch current does not exist
Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master
但这给了我一个错误。
我也尝试过: bower install angular-ui-router#master 但错误保持不变。
然后我编辑了我的 bower.json 文件并添加了条目:“angular-ui-router”:“0.2.8”并执行了 bower install 命令:
stephane@stephane-ThinkPad-X60:angular-news> bower install
bower not-cached git://github.com/angular-ui/ui-router.git#0.2.8
bower resolve git://github.com/angular-ui/ui-router.git#0.2.8
bower not-cached git://github.com/firebase/firebase-bower.git#current
bower resolve git://github.com/firebase/firebase-bower.git#current
bower download https://github.com/angular-ui/ui-router/archive/0.2.8.tar.gz
bower extract angular-ui-router#0.2.8 archive.tar.gz
bower resolved git://github.com/angular-ui/ui-router.git#0.2.8
bower ENORESTARGET Tag/branch current does not exist
Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master
那是我吗 ?
这是我的 bower.json 文件内容:
{
"name": "angular-news",
"version": "0.0.0",
"dependencies": {
"angular": "1.2.16",
"json3": "~3.3.1",
"es5-shim": "~3.1.0",
"bootstrap": "~3.2.0",
"stacktrace": "0.6.0",
"firebase": "current",
"angular-resource": "1.2.16",
"angular-cookies": "1.2.16",
"angular-sanitize": "1.2.16",
"angular-animate": "1.2.16",
"angular-touch": "1.2.16",
"angular-route": "1.2.16"
},
"devDependencies": {
"angular-mocks": "1.2.16",
"angular-scenario": "1.2.16"
},
"appPath": "app"
}
更新:
firebase 依赖似乎是问题所在。
我尝试了命令:
bower install firebase
bower not-cached git://github.com/firebase/firebase-bower.git#current
bower resolve git://github.com/firebase/firebase-bower.git#current
bower cached git://github.com/angular-ui/ui-router.git#0.2.8
bower validate 0.2.8 against git://github.com/angular-ui/ui-router.git#0.2.8
bower cached git://github.com/firebase/firebase-bower.git#1.0.18
bower validate 1.0.18 against git://github.com/firebase/firebase-bower.git#*
bower new version for git://github.com/firebase/firebase-bower.git#*
bower resolve git://github.com/firebase/firebase-bower.git#*
bower download https://github.com/firebase/firebase-bower/archive/v1.0.19.tar.gz
bower extract firebase#* archive.tar.gz
bower resolved git://github.com/firebase/firebase-bower.git#1.0.19
bower ENORESTARGET Tag/branch current does not exist
Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master
由于错误消息显示唯一可用的分支是:master 然后我编辑了我的 bower.json 文件以将依赖项更改为“firebase”:“master”并尝试再次安装 bower:
stephane@stephane-ThinkPad-X60:angular-news> bower install firebase
bower not-cached git://github.com/firebase/firebase-bower.git#master
bower resolve git://github.com/firebase/firebase-bower.git#master
bower cached git://github.com/angular-ui/ui-router.git#0.2.8
bower validate 0.2.8 against git://github.com/angular-ui/ui-router.git#0.2.8
bower cached git://github.com/firebase/firebase-bower.git#1.0.19
bower validate 1.0.19 against git://github.com/firebase/firebase-bower.git#*
bower checkout firebase#master
bower not-cached git://github.com/firebase/firebase-bower.git#master
bower resolve git://github.com/firebase/firebase-bower.git#master
bower checkout firebase#master
bower resolved git://github.com/firebase/firebase-bower.git#86ea9e429c
bower resolved git://github.com/firebase/firebase-bower.git#86ea9e429c
Unable to find a suitable version for firebase, please choose one:
1) firebase#master which resolved to 86ea9e429c and is required by angular-news
2) firebase#~1.0.19 which resolved to 1.0.19
Prefix the choice with ! to persist it to bower.json
[?] Answer: 1
bower install firebase#86ea9e429c
bower install angular-ui-router#0.2.8
firebase#86ea9e429c app/bower_components/firebase
angular-ui-router#0.2.8 app/bower_components/angular-ui-router
└── angular#1.2.16
亲切的问候,
斯蒂芬·艾伯特