2015-02-12 16 views
17

Sto cercando di installare Fondazione, ma il suo continuo dandomi conflitto con JqueryECONFLICT Impossibile trovare la versione adatta per jQuery Fondazione

λ 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 

Il mio file bower.json è questo

{ 
    "name": "refactor", 
    "private": true, 
    "dependencies": { 
    "jquery": "~1.11.1", 
    "raphael": "1.3.x", 
    "font-awesome": "~4.3.0", 
    "foundation": "x" 
    } 
} 
+0

utilizzare "jquery": "> = 2.0.0" –

+0

Ho appena rimosso JQuery. Ora che vengo dalla Fondazione, non conosco la pratica giusta o no –

+0

Controlla la mia risposta qui sotto, fammi sapere se ha funzionato. grazie –

risposta

29

Uso resolutions nel vostro 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" 
    } 
} 

Ciò importerà a Bower di utilizzare quella versione specifica di jQuery.

+0

Eccellente! Grazie mille! –

+0

Questo ha funzionato per me! I messaggi di errore che stavo ottenendo dal log di debug npm (e un po 'più enigmaticamente nella console) indicavano la versione di jQuery necessaria. Questo è stato durante il provisioning vagabondo per un sito Drupal 8. Molte grazie! –

1

Provare ad usare questa per la versione Jquery:

"jquery": ">= 2.0.0" 

Comunque penso che avresti solo bisogno di Foundation come dipendenza:

enter image description here

o:

{ 
    "name": "PROJECT_NAME", 
    "dependencies": { 
     "foundation": "~5.4.7" 
    } 
} 

controllare anche qui per maggiori dettagli:

http://foundation.zurb.com/docs/sass.html

3

Il modo migliore per iniziare è di fare

bower cache clean 

Dopo che quando si fa

bower install vi chiederà

'Unable to find a suitable version for <Your Dependency Name>, please choose one:,

poi potete inserire !1 o !2 o qualsiasi altra cosa si adatta alle tue esigenze.

Questo essenzialmente aggiunge il blocco di risoluzione in bower.json come accennato da @esbanarango ma offre solo più controllo e comprensione su ciò che si sta facendo.

Problemi correlati