vue.js エラー「The engine “node” is incompatible with this module. Expected version」が発生した場合の対処法

vue.jsでyarn add実行時に、エラー「The engine “node” is incompatible with this module. Expected version」が発生した場合の対処法を記述してます。
環境
- OS CentOS Stream release 8
- node v14.15.1
- npm 6.14.8
エラー全文
yarn addでモジュールを追加しようとしたときに発生
error vue-snap@0.1.0-beta.7: The engine "node" is incompatible with this module. Expected version ">=12.13.0 <13.0.0". Got "14.15.1"
error Found incompatible module.

原因
nodeのバージョンを上げたことが原因ぽい
対処法
nodeのバージョンを言われた通りに「”>=12.13.0 <13.0.0″」にすれば問題なさそうですが、対象のモジュールである「vue-snap」がアップデートできそうだったので、再インストールしてアップデートすることで解決しました。
yarn add vue-snap
-
前の記事
python 文字列の文字数を取得する 2021.01.06
-
次の記事
CSS3だけでスムーズスクロール 2021.01.06
コメントを書く