Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

javascript - bower ECONFLICT Unable to find suitable version for jquery error even after adding resolutions

"dependencies": { 
  "jquery": "~2.1.4", 
  "angular": "~1.5.0",
  ....
  ....
},
"resolutions": {
  "jquery": "~2.1.4",
  "angular": "~1.5.0"
}

bower install angular-peity --save

bower angular-peity#* cached https://github.com/projectweekend/angular-peity.git#0.0.5 bower angular-peity#* validate 0.0.5 against https://github.com/projectweekend/angular-peity.git#* bower peity#* cached https://github.com/benpickles/peity.git#3.2.1 bower peity#* validate 3.2.1 against https://github.com/benpickles/peity.git#* bower jquery#~2.0.3 cached https://github.com/jquery/jquery-dist.git#2.0.3 bower jquery#~2.0.3 validate 2.0.3 against https://github.com/jquery/jquery-dist.git#~2.0.3 bower jquery#>=1.6 cached https://github.com/jquery/jquery-dist.git#3.1.1 bower jquery#>=1.6 validate 3.1.1 against https://github.com/jquery/jquery-dist.git#>=1.6 bower jquery#>=1.7 cached https://github.com/jquery/jquery-dist.git#3.1.1 bower jquery#>=1.7 validate 3.1.1 against https://github.com/jquery/jquery-dist.git#>=1.7 bower jquery#1.9.1 - 3 cached https://github.com/jquery/jquery-dist.git#3.1.1 bower jquery#1.9.1 - 3 validate 3.1.1 against https://github.com/jquery/jquery-dist.git#1.9.1 - 3 bower jquery#>=1.4.4 cached https://github.com/jquery/jquery-dist.git#3.1.1 bower jquery#>=1.4.4 validate 3.1.1 against https://github.com/jquery/jquery-dist.git#>=1.4.4 bower jquery#^2.0.3 cached https://github.com/jquery/jquery-dist.git#2.2.4 bower jquery#^2.0.3 validate 2.2.4 against https://github.com/jquery/jquery-dist.git#^2.0.3 bower ECONFLICT Unable to find suitable version for jquery

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Best way to start with is to do

bower cache clean

After that when you do

bower install it will ask you

Unable to find a suitable version for jquery, please choose one:
1) jquery#exampleversion1 which resolved to 1.5.3 and is required by demo1
2) jquery#^exampleversion2 which resolved to 1.5.3 and is required by app2    
3) jquery#>.examplegversion3 which resolved to 1.5.3 and is required by app3Test

then you can enter !1 or !2 , or whatever suits your needs the best.

Prefixing number with ! essentially adds the resolution block into bower.json but it will give you more control over what's happening and it might solve your problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...