简体   繁体   中英

Why does Bower install update my jQuery version to 2.1.1?

Running Bower install updates my jquery version to 2.11.

I currently have:

 "dependencies": {
    "jquery": "= 1.11.0",
    "jquery-migrate": ">= 1.2.1",
    "jquery-ui": "= 1.10.4",
    "bootstrap": "= 3.1.1",
    "html5shiv": "=3.7.0",
    "respond": "=1.4.2",
    "angular": "1.2.16",
    "angular-route": "1.2.16",
    "angular-ui-router": "0.2.10",
    "requirejs": "2.1.14",
    "angular-mocks": "1.2.16",
    "ngprogress": "1.0.4"
  }

This is my log:

-----------------------------------------
Update available: 1.3.5 (current: 1.2.8)
Run npm update -g bower to update
-----------------------------------------

bower jquery#>=1.6              cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#>=1.6            validate 2.1.1 against git://github.com/jquery/jquery.git#>=1.6
bower jquery#>= 1.9.0           cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#>= 1.9.0         validate 2.1.1 against git://github.com/jquery/jquery.git#>= 1.9.0
bower jquery#>=1.6             install jquery#2.1.1

如果只希望使用jquery 1.x分支,则应具有“ jquery”:“ 1.x”,

Do you have anything jQuery related in the 'devDependencies' section? I had the same issue and it was because I was requiring jQuery 2.x in the devDependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM