Grunt と bower を使用してプロジェクトをビルドすると、Foundation がエラーを引き起こしているようです。パッケージなどをダウンロードしていることがわかります。その後、次のように終了します。
致命的なエラー: jquery に適したバージョンが見つかりません
これが私のbower.jsonです:
{
"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 から各依存関係を 1 つずつ削除し、毎回 grunt ファイル (bower インストールのトリガーを含む) を再実行しようとしました。Foundation 行を削除するまで、そのエラーが発生します。その後、すべて正常に動作します (まあ、Grunt が Foundation ファイルを探すまでは)。
私は Foundation の bower.json とその依存関係を調べましたが、何も「ないようです」。
bower.json に解像度を追加しようとしました。
...,
"resolutions": {
"jquery": "1.11.0"
}
}
しかし、それは役に立ちませんでした。(私の使い方が悪いのかもしれませんが?)
コマンドラインから直接試すとbower install
、次のようになります。
> 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:
そこでバージョンを選択できますが、うまくいくようです。しかし、これはビルド スクリプト内で機能する必要があります。