也許我不明白SemVer語法也許我不明白鮑爾(我有1.4.1版),但我有一個應用程序,其bower.json是:涼亭:沒有合適的角度版本
{
"name": "MyApp",
"description": "My AngularJS Project....",
"version": "0.0.0",
"homepage": "https://github.com/angular/angular-seed",
"license": "MIT",
"private": true,
"dependencies": {
"angular": "1.3.x",
"angular-route": "1.3.x",
"angular-loader": "1.3.x",
"angular-mocks": "~1.3.x",
"angular-ui-grid": "~3.0.0-rc.20",
"angular-spinkit": "~0.3.3",
"angular-bootstrap": "0.13.0",
"bootstrap": "3.3.4",
"angular-animate": "~1.3.x",
"file-saver.js": "~1.20150507.2"
},
"resolutions": {
}
}**
當我做'涼亭更新',它是「無法找到合適的角度版本」,但我不明白爲什麼不。下面是輸出(#1似乎是問題):
Unable to find a suitable version for angular, please choose one:
1) angular#>=1.2.16 <=1.3.x which resolved to 1.2.28 and is required by angular-ui-grid#3.0.0-rc.22
2) angular#1.3.16 which resolved to 1.3.16 and is required by angular-animate#1.3.16, angular-loader#1.3.16, angular-mocks#1.3.16, angular-route#1.3.16
3) angular#1.3.x which resolved to 1.3.16 and is required by MyApp
4) angular#>=1.3.0 which resolved to 1.3.16 and is required by angular-bootstrap#0.13.0
5) angular#* which resolved to 1.3.16 and is required by angular-spinkit#0.3.3
所以我認爲輸出的解讀是,所有的包將很高興與角1.3.16版本,除了角UI電網 (「解析爲1.2.28」)但是爲什麼?不是1.3.16> = 1.2.16 < = 1.3.x?那麼Angular的1.3.16版本是不是合適的版本?它不是唯一合適的版本嗎?或者我誤解了鮑爾想要告訴我的東西。
我明白我可以選擇其中一個選項,甚至可以添加'!'堅持我的選擇,但我不明白爲什麼需要選擇。
感謝
奇怪的是,我注意到當我將依賴規範設置爲「> = 1.2.16 <= 1.3.x」時,我們遇到了這個問題,並且我認爲將1.3.x更改爲1.3.16會讓它安裝該版本。這似乎是在我做的測試中做的。 – c0bra
我還設置了一個運行程序來測試semver.js的版本規範:http://plnkr.co/edit/dHvHpgK53mtEcgI2goDQ?p=preview – c0bra