問題
コンソールから$ npm i
を実行時、以下のワーニングが表示される
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@eslint/config-array@0.17.1',
npm WARN EBADENGINE required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE current: { node: 'v18.16.0', npm: '9.5.1' }
npm WARN EBADENGINE }
# 以下同様のワーニングが多数
原因
Node.jsのバージョンが違うことが原因でした。
npm WARN EBADENGINE Unsupported engine {
# インポート対象のパッケージ
npm WARN EBADENGINE package: '@eslint/config-array@0.17.1',
# 必要なバージョン
# 「18.18.0」 または 「20.9.0」 または 「21.1.0以上」
npm WARN EBADENGINE required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
# 現在のバージョンはv18.16.0
npm WARN EBADENGINE current: { node: 'v18.16.0', npm: '9.5.1' }
npm WARN EBADENGINE }
解決
Node.jsのバージョンを対応のバージョン(今回は「18.18.0」)にして再度$ npm i
を実行するとワーニングが解消されました。