yarn installでerror : The engine "node" is incompatible with this module. が出たときの対処法
本記事ではyarn installの実行時に遭遇したエラーの対処法について記します。
環境
Ubuntu 16.04
node 12.18.3
エラー内容
yarn installをしたときに下記のようなエラーメッセージが表示されて実行できませんでした。
error @: The engine "node" is incompatible with this module. Expected version "~10". Got "12.18.3" error Found incompatible module.
対処法
原因は書いてある通りですが、バージョンによるものです。
ただ、nodeのバージョンをいちいち下げるのも面倒くさいので下記のように--ignore-enginesを用いて解決しました。
yarn install --ignore-engines
もしこれでもエラーが解決できなければ大人しくバージョンを下げた方がいいかもしれません。