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

后端 未结 2 746
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 05:47
\"dependencies\": { 
  \"jquery\": \"~2.1.4\", 
  \"angular\": \"~1.5.0\",
  ....
  ....
},
\"resolutions\": {
  \"jquery\": \"~2.1.4\",
  \"angular\": \"~1.5.0\"
}
         


        
2条回答
  •  轮回少年
    2020-12-07 06:09

    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.

提交回复
热议问题