无论" bower.json"中指定的版本如何?文件,凉亭(v1.8.0)忽略它并下载可用库的最新版本。它不是要求指定版本。降级到凉亭的早期版本(v1.3.8)并没有帮助:(例如,我已经指定anuglarjs为1.5.8,但它下载1.6.4。
我的bower.json
{
"name": "XXXXXXXXXXXX",
"homepage": "XXXXXXXXXXXX",
"authors": [
"XXXXXXXXXX"
],
"description": "XXXXXXXXXXXX",
"main": "",
"overrides": {
"bootstrap": {
"main": [
"./dist/css/bootstrap.min.css",
"./fonts/glyphicons-halflings-regular.eot",
"./fonts/glyphicons-halflings-regular.svg",
"./fonts/glyphicons-halflings-regular.ttf",
"./fonts/glyphicons-halflings-regular.woff",
"./fonts/glyphicons-halflings-regular.woff2"
]
},
"pouchdb": {
"main": [
"./dist/pouchdb.min.js"
]
},
"cldrjs": {
"ignore": true
},
"cldr-data": {
"ignore": true
},
"globalize": {
"ignore": true
}
},
"license": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "^2.2.3",
"angular": "^1.5.8",
"bootstrap": "^3.3.7",
"angular-route": "^1.4.9",
"toastr": "^2.1.3",
"angular-toastr": "^2.1.1",
"angular-cookies": "^1.5.8",
"angular-translate": "^2.12.0",
"angular-i18n": "^1.5.8",
"angular-translate-loader-static-files": "^2.12.0",
"angular-translate-storage-local": "^2.12.0",
"angular-sanitize": "^1.5.8",
"devextreme": "^16.1.7",
"ngstorage": "^0.3.11",
"angular-base64-upload": "^0.1.19",
"pouchdb": "^6.0.7",
"pouchdb-find": "^0.10.3",
"angular-disable-all": "^0.0.2",
"angular-loading-bar": "^0.9.0"
}
}
答案 0 :(得分:1)
Remove the ^
symbol in front of the version number. This means "at least this version". In other words: It won't update your library if the version is equal or higher to the specified version, but if you are installing a new workspace, it will take the newest one.
Here are some more information: What is the bower (and npm) version syntax?