2014-05-15 4 views
0

Grunt 및 bower를 사용하여 프로젝트를 빌드 할 때 Foundation에서 오류가 발생한 것으로 보입니다.Foundation5가 grunt/bower 빌드에서 오류를 발생시킵니다.

{ 
    "name": "MyProject", 
    "version": "1", 
    "dependencies": { 
    "cytoscape": "2.2.7", 
    "datatables": "1.9.4", 
    "font-awesome": "4.0.3", 
    "foundation": "5.2.2", 
    "jquery-legacy": "jquery#1.11.0", 
    "kineticjs": "5.1.0", 
    "nouislider": "6.2.0", 
    "rem-unit-polyfill": "1.2.4", 
    "respond": ">=1.4.2" 
    } 
} 

내가 위의 bower.json에서 각 의존성을 제거하려 하나했습니다 여기 내 bower.json의

Fatal error: Unable to find suitable version for jquery

: 당신은 그때는 종료됩니다, 그것은 등, 패키지를 다운로드 볼 수 있습니다 하나, 그리고 내 grunt 파일 (bower 설치를위한 트리거 포함)을 매번 다시 실행하십시오. Foundation 라인을 삭제하기 전까지는 오류가 발생합니다. 그런 다음 Grunt가 기초 파일을 찾을 때까지 모든 것이 정상적으로 작동합니다.

Foundation의 bower.json과 그 종속성을 살펴 봤지만 아무것도 보이지 않습니다.

나는 나의 bower.json에 해상도를 추가하려고 시도 :

..., 
    "resolutions": { 
    "jquery": "1.11.0" 
    } 
} 

그러나 그것은 도움이되지 않았다.

> Unable to find a suitable version for jquery, please choose one: 
>  1) jquery#~1.8.0 which resolved to 1.8.3+1 and has datatables#1.9.4 as dependants 
>  2) jquery#>= 2.1.0 which resolved to 2.1.1 and has foundation#5.2.2 as dependants 
>  3) jquery#>=1.2 which resolved to 2.1.1 and has jquery.cookie#1.4.1 as dependants 
>  4) jquery#>= 1.7.0 which resolved to 2.1.1 and has nouislider#6.2.0 as dependants 
> 
> Prefix the choice with ! to persist it to bower.json 
> 
> [?] Answer: 

내가 거기 버전을 선택할 수 있습니다, 작동하는 것 같다 (? 내가 잘못 것을 사용할 수 있지만)

내가 명령 줄에서 직접 bower install을하려고하면 나는이 얻을. 그러나 빌드 스크립트 내에서이 작업이 필요합니다.

답변

1

시도 jQuery를가로 변경 :

"jquery": "~1.11.0" 

편집

재단의 bower.json에 따르면, 그것은 필요로한다고 jQuery를> = 충돌 사이가 2.1

{ 
    "name": "foundation", 
    "version": "5.2.2", 
    "main": [ 
    "css/foundation.css", 
    "js/foundation.js" 
    ], 
    "dependencies": { 
    "jquery": ">= 2.1.0", 
    "modernizr": ">= 2.7.2", 
    "fastclick": ">=0.6.11", 
    "jquery.cookie": "~1.4.0", 
    "jquery-placeholder": "~2.0.7" 
    }, 
    "devDependencies": { 
    "jquery.autocomplete": "devbridge/jQuery-Autocomplete#1.2.9", 
    "lodash": "~2.4.1" 
    }, 
    "private": true 
} 

다음 2 버전. 그것을 바꿨 니?