yarn dev時に「To install them, you can run: npm install –save core-js/modules/es.array.concat」が発生した場合の対処法

yarn dev時に「To install them, you can run: npm install –save core-js/modules/es.array.concat」が発生した場合の対処法

nuxt.jsでyarn dev実行時に「To install them, you can run: npm install –save core-js/modules/es.array.concat」が発生した場合の対処法を記述してます。

環境

  • OS  CentOS Linux release 8.0.1905 (Core)
  • node V12.16.3
  • npm 6.14.4
  • nuxt 2.12.2

エラー全文

yarn dev時に発生。

To install them, you can run: npm install --save core-js/modules/es.array.concat core-js/modules/es.array.every core-js/modules/es.array.filter core-js/modules/es.array.find core-js/modules/es.array.for-each core-js/modules/es.array.from core-js/modules/es.array.includes core-js/modules/es.array.index-of core-js/modules/es.array.iterator core-js/modules/es.array.join core-js/modules/es.array.map core-js/modules/es.array.reduce core-js/modules/es.array.slice core-js/modules/es.array.some core-js/modules/es.function.name core-js/modules/es.object.assign core-js/modules/es.object.get-own-property-descriptor core-js/modules/es.object.get-own-property-descriptors core-js/modules/es.object.keys core-js/modules/es.object.to-string core-js/modules/es.promise core-js/modules/es.promise.finally core-js/modules/es.regexp.constructor core-js/modules/es.regexp.exec core-js/modules/es.regexp.to-string core-js/modules/es.string.includes core-js/modules/es.string.iterator core-js/modules/es.string.match core-js/modules/es.string.repeat core-js/modules/es.string.replace core-js/modules/es.string.search core-js/modules/es.string.split core-js/modules/es.string.starts-with core-js/modules/es.symbol core-js/modules/es.symbol.description core-js/modules/es.symbol.iterator core-js/modules/web.dom-collections.for-each core-js/modules/web.dom-collections.iterator core-js/modules/web.timers

原因

最新バージョンのcore-jsが必要

対処法

最新版のcore-jsをインストールすると解決しました

npm i core-js@latest