ECONFLICT Невозможно найти подходящую версию для jQuery Foundation
Я пытаюсь установить Foundation, но он постоянно дает мне конфликт с JQuery
λ bower install foundation
bower foundation#x cached https://github.com/zurb/bower-foundation.git#5.5.1
bower foundation#x validate 5.5.1 against https://github.com/zurb/bower-foundation.git#x
bower foundation#* cached https://github.com/zurb/bower-foundation.git#5.5.1
bower foundation#* validate 5.5.1 against https://github.com/zurb/bower-foundation.git#*
bower jquery#>= 2.1.0 cached https://github.com/jquery/jquery.git#2.1.3
bower jquery#>= 2.1.0 validate 2.1.3 against https://github.com/jquery/jquery.git#>= 2.1.0
bower modernizr#>= 2.7.2 cached https://github.com/Modernizr/Modernizr.git#2.8.3
bower modernizr#>= 2.7.2 validate 2.8.3 against https://github.com/Modernizr/Modernizr.git#>= 2.7.2
bower jquery.cookie#~1.4.0 cached https://github.com/carhartl/jquery-cookie.git#1.4.1
bower jquery.cookie#~1.4.0 validate 1.4.1 against https://github.com/carhartl/jquery-cookie.git#~1.4.0
bower fastclick#>=0.6.11 cached https://github.com/ftlabs/fastclick.git#1.0.6
bower fastclick#>=0.6.11 validate 1.0.6 against https://github.com/ftlabs/fastclick.git#>=0.6.11
bower jquery-placeholder#~2.0.7 cached https://github.com/mathiasbynens/jquery-placeholder.git#2.0.9
bower jquery-placeholder#~2.0.7 validate 2.0.9 against https://github.com/mathiasbynens/jquery-placeholder.git#~2.0.7
bower ECONFLICT Unable to find suitable version for jquery
Мой файл bower.json - это
{
"name": "refactor",
"private": true,
"dependencies": {
"jquery": "~1.11.1",
"raphael": "1.3.x",
"font-awesome": "~4.3.0",
"foundation": "x"
}
}
Ответы
Ответ 1
Используйте resolutions
в bower.json
{
"name": "refactor",
"private": true,
"dependencies": {
"jquery": "~1.11.1",
"raphael": "1.3.x",
"font-awesome": "~4.3.0",
"foundation": "x"
},
"resolutions": {
"jquery": "~1.11.1"
}
}
Это заставит bower использовать эту конкретную версию jQuery.
Ответ 2
Лучший способ начать - сделать
bower cache clean
После этого, когда вы делаете
bower install
он попросит вас
'Unable to find a suitable version for <Your Dependency Name>, please choose one:
,
то вы можете ввести !1
или !2
, или что вам больше всего подходит.
Это существенно добавляет блок резолюции в bower.json, как упоминалось в @esbanarango, но он просто дает больше контроля и понимания того, что вы делаете.
Ответ 3
Попробуйте использовать это для версии JQuery:
"jquery": ">= 2.0.0"
Однако, я думаю, вам понадобится только Foundation в качестве зависимости:
![enter image description here]()
или
{
"name": "PROJECT_NAME",
"dependencies": {
"foundation": "~5.4.7"
}
}
также проверьте здесь более подробную информацию:
http://foundation.zurb.com/docs/sass.html