bower ECONFLICT Unable to find suitable version fo

2019-01-15 21:47发布

"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

2条回答
ゆ 、 Hurt°
2楼-- · 2019-01-15 22:31

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.

查看更多
做个烂人
3楼-- · 2019-01-15 22:37

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.

查看更多
登录 后发表回答