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

最后都变了- 提交于 2019-11-26 23:41:04

问题


"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


回答1:


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.




回答2:


I was getting the same error on Windows 10 with Git Bash for Windows

ECONFLICT Unable to find suitable version for jquery

and it was not going to the part where I could choose options !1 or !2

For me switching to Windows PowerShell solved the problem and runing the same command bower install

I am suspecting it was connected with the user permissions.



来源:https://stackoverflow.com/questions/42618699/bower-econflict-unable-to-find-suitable-version-for-jquery-error-even-after-addi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!