2017-04-09 9 views
0

"bower.json"파일에 지정된 버전과 상관없이 bower (v1.8.0)는이를 무시하고 사용 가능한 최신 버전의 라이브러리를 다운로드합니다. 버전을 지정하십시오. 예를 들어 내가 1.5.8로 anuglarjs를 지정하지만 1.6.4을 다운로드합니다. :(도움이되지 않았다 정자의 이전 버전 (v1.3.8)로 다운 그레이드.Bower는 항상 지정된 버전 대신 최신 버전을 설치합니다.

내 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" 
    } 
} 

답변

1

버전 번호 앞에있는 ^ 기호를 제거하십시오. "적어도이 버전"을 의미합니다. 즉, 버전이 지정된 버전과 같거나 높으면 라이브러리를 업데이트하지 않지만 새로운 작업 공간을 선택하면 최신 버전이 적용됩니다.

여기에 더 많은 정보가 있습니다. What is the bower (and npm) version syntax?