3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Vuetify入れたらrun serve出来なくなった

Last updated at Posted at 2020-11-07

Vue.jsでアプリケーションを作成しVuetifyを導入したところ、それまで出来ていたローカルサーバーの立ち上げが急に出来ず、以下のエラーを吐いてしまいました。

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 673 errors                                                                                                                                                                                                                        0:45:49
These dependencies were not found:

* core-js/modules/es.array.concat in ./node_modules/vuetify/lib/components/VCalendar/VCalendarWeekly.js, ./node_modules/vuetify/lib/components/VCalendar/VCalendarDaily.js and 44 others
* core-js/modules/es.array.every in ./node_modules/vuetify/lib/components/VColorPicker/util/index.js, ./node_modules/vuetify/lib/components/VDataIterator/VDataIterator.js and 3 others
* core-js/modules/es.array.fill in ./node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonthTable.js, ./node_modules/vuetify/lib/components/VSparkline/VSparkline.js and 1 other
* core-js/modules/es.array.filter in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js, ./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js and 20 others
* core-js/modules/es.array.find in ./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js, ./node_modules/vuetify/lib/components/VCombobox/VCombobox.js and 14 others
* core-js/modules/es.array.find-index in ./node_modules/vuetify/lib/components/VData/VData.js, ./node_modules/vuetify/lib/components/VDataTable/VDataTable.js and 6 others
* core-js/modules/es.array.flat in ./node_modules/vuetify/lib/components/VCard/VCard.js, ./node_modules/vuetify/lib/components/VColorPicker/VColorPicker.js and 7 others
* core-js/modules/es.array.for-each in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js, ./node_modules/vuetify/lib/framework.js and 18 others
* core-js/modules/es.array.from in ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js and 5 others
* core-js/modules/es.array.includes in ./node_modules/vuetify/lib/framework.js, ./node_modules/vuetify/lib/components/VAlert/VAlert.js and 28 others
* core-js/modules/es.array.index-of in ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js, ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js and 15 others
* core-js/modules/es.array.join in ./node_modules/vuetify/lib/components/VBreadcrumbs/VBreadcrumbs.js, ./node_modules/vuetify/lib/components/VDataTable/VDataTableHeaderDesktop.js and 8 others     
* core-js/modules/es.array.map in ./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js, ./node_modules/vuetify/lib/components/VCalendar/VCalendarCategory.js and 44 others
* core-js/modules/es.array.reduce in ./node_modules/vuetify/lib/components/VCalendar/VCalendar.js, ./node_modules/vuetify/lib/components/VCalendar/modes/stack.js and 10 others
* core-js/modules/es.array.slice in ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js, ./node_modules/vuetify/lib/components/VCalendar/VCalendarWeekly.js and 18 others
* core-js/modules/es.array.some in ./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js, ./node_modules/vuetify/lib/components/VDataIterator/VDataIterator.js and 9 others
* core-js/modules/es.array.splice in ./node_modules/vuetify/lib/components/VCombobox/VCombobox.js, ./node_modules/vuetify/lib/components/VData/VData.js and 6 others
* core-js/modules/es.array.unscopables.flat in ./node_modules/vuetify/lib/components/VCard/VCard.js, ./node_modules/vuetify/lib/components/VColorPicker/VColorPicker.js and 7 others
* core-js/modules/es.function.name in ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js, ./node_modules/vuetify/lib/components/VCombobox/VCombobox.js and 17 others
* core-js/modules/es.map in ./node_modules/vuetify/lib/components/VGrid/VRow.js, ./node_modules/vuetify/lib/components/VGrid/VCol.js and 2 others
* core-js/modules/es.math.cbrt in ./node_modules/vuetify/lib/util/color/transformCIELAB.js
* core-js/modules/es.math.sign in ./node_modules/vuetify/lib/components/VDatePicker/VDatePickerDateTable.js, ./node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonthTable.js and 1 other
* core-js/modules/es.number.constructor in ./node_modules/vuetify/lib/components/VAppBar/VAppBar.js, ./node_modules/vuetify/lib/components/VAvatar/VAvatar.js and 74 others
* core-js/modules/es.number.max-safe-integer in ./node_modules/vuetify/lib/components/VCalendar/VCalendarWeekly.js
* core-js/modules/es.number.to-fixed in ./node_modules/vuetify/lib/components/VAppBar/VAppBar.js, ./node_modules/vuetify/lib/components/VSlider/VSlider.js and 1 other
* core-js/modules/es.object.freeze in ./node_modules/vuetify/lib/services/icons/presets/index.js, ./node_modules/vuetify/lib/util/colors.js and 1 other
* core-js/modules/es.object.get-own-property-descriptor in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
* core-js/modules/es.object.get-own-property-descriptors in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
* core-js/modules/es.object.get-prototype-of in ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
* core-js/modules/es.object.is in ./node_modules/vuetify/lib/components/VTextField/VTextField.js
* core-js/modules/es.object.keys in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js, ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js and 17 others
* core-js/modules/es.object.to-string in ./node_modules/@babel/runtime/helpers/esm/typeof.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js and 29 others
* core-js/modules/es.object.values in ./node_modules/vuetify/lib/components/VDataIterator/VDataIterator.js, ./node_modules/vuetify/lib/components/VForm/VForm.js and 2 others
* core-js/modules/es.reflect.construct in ./node_modules/@babel/runtime/helpers/esm/createSuper.js, ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
* core-js/modules/es.regexp.exec in ./node_modules/vuetify/lib/components/VCalendar/VCalendar.js, ./node_modules/vuetify/lib/components/VCalendar/VCalendarCategory.js and 28 others
* core-js/modules/es.regexp.to-string in ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js, ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js and 16 others
* core-js/modules/es.set in ./node_modules/vuetify/lib/components/VTreeview/VTreeview.js
* core-js/modules/es.string.anchor in ./node_modules/vuetify/lib/services/theme/utils.js
* core-js/modules/es.string.ends-with in ./node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.js, ./node_modules/vuetify/lib/components/VCombobox/VCombobox.js and 1 other
* core-js/modules/es.string.fixed in ./node_modules/vuetify/lib/components/VAppBar/VAppBar.js, ./node_modules/vuetify/lib/components/VBottomNavigation/VBottomNavigation.js and 6 others
* core-js/modules/es.string.includes in ./node_modules/vuetify/lib/framework.js, ./node_modules/vuetify/lib/components/VColorPicker/VColorPicker.js and 15 others
* core-js/modules/es.string.iterator in ./node_modules/@babel/runtime/helpers/esm/typeof.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js and 11 others
* core-js/modules/es.string.link in ./node_modules/vuetify/lib/mixins/routable/index.js
* core-js/modules/es.string.match in ./node_modules/vuetify/lib/components/VList/VListGroup.js, ./node_modules/vuetify/lib/components/VTimePicker/VTimePicker.js and 2 others
* core-js/modules/es.string.pad-start in ./node_modules/vuetify/lib/components/VDatePicker/VDatePickerDateTable.js
* core-js/modules/es.string.repeat in ./node_modules/vuetify/lib/components/VDatePicker/util/pad.js, ./node_modules/vuetify/lib/util/helpers.js and 2 others
* core-js/modules/es.string.replace in ./node_modules/vuetify/lib/components/VDatePicker/VDatePicker.js, ./node_modules/vuetify/lib/components/VGrid/VRow.js and 8 others
* core-js/modules/es.string.search in ./node_modules/vuetify/lib/components/VData/VData.js, ./node_modules/vuetify/lib/components/VTreeview/VTreeview.js
* core-js/modules/es.string.small in ./node_modules/vuetify/lib/components/VIcon/VIcon.js, ./node_modules/vuetify/lib/components/VRating/VRating.js and 2 others
* core-js/modules/es.string.split in ./node_modules/vuetify/lib/components/VCalendar/VCalendar.js, ./node_modules/vuetify/lib/components/VCalendar/VCalendarCategory.js and 18 others
* core-js/modules/es.string.starts-with in ./node_modules/vuetify/lib/components/VGrid/VContainer.js, ./node_modules/vuetify/lib/components/VGrid/VCol.js and 6 others
* core-js/modules/es.string.sub in ./node_modules/vuetify/lib/directives/mutate/index.js
* core-js/modules/es.string.trim in ./node_modules/vuetify/lib/components/VAppBar/VAppBarNavIcon.js, ./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js and 16 others
* core-js/modules/es.symbol in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js, ./node_modules/@babel/runtime/helpers/esm/typeof.js and 5 others
* core-js/modules/es.symbol.description in ./node_modules/@babel/runtime/helpers/esm/typeof.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js and 3 others
* core-js/modules/es.symbol.iterator in ./node_modules/@babel/runtime/helpers/esm/typeof.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js and 2 others
* core-js/modules/web.dom-collections.for-each in ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js, ./node_modules/vuetify/lib/framework.js and 13 others
* core-js/modules/web.dom-collections.iterator in ./node_modules/@babel/runtime/helpers/esm/typeof.js, ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js and 7 others

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.fill core-js/modules/es.array.filter core-js/modules/es.array.find core-js/modules/es.array.find-index core-js/modules/es.array.flat 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.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.array.splice core-js/modules/es.array.unscopables.flat core-js/modules/es.function.name core-js/modules/es.map core-js/modules/es.math.cbrt core-js/modules/es.math.sign core-js/modules/es.number.constructor core-js/modules/es.number.max-safe-integer core-js/modules/es.number.to-fixed core-js/modules/es.object.freeze core-js/modules/es.object.get-own-property-descriptor core-js/modules/es.object.get-own-property-descriptors core-js/modules/es.object.get-prototype-of core-js/modules/es.object.is core-js/modules/es.object.keys core-js/modules/es.object.to-string core-js/modules/es.object.values core-js/modules/es.reflect.construct core-js/modules/es.regexp.exec core-js/modules/es.regexp.to-string core-js/modules/es.set core-js/modules/es.string.anchor core-js/modules/es.string.ends-with core-js/modules/es.string.fixed core-js/modules/es.string.includes core-js/modules/es.string.iterator core-js/modules/es.string.link core-js/modules/es.string.match core-js/modules/es.string.pad-start core-js/modules/es.string.repeat core-js/modules/es.string.replace core-js/modules/es.string.search core-js/modules/es.string.small core-js/modules/es.string.split core-js/modules/es.string.starts-with core-js/modules/es.string.sub core-js/modules/es.string.trim 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
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

大量のエラーメッセージに戸惑いつつも、とりあえずググって対処しました。
今後、同様のエラーが発生することと、NuxtはあってもVueはあまり無かったので、備忘録として寄稿致しました。

原因と対処法

調べると、core-jsのバージョンがVuetifyに対応していない為、最新版のcore-jsをインストールすることで解決出来ました。

npm install --save core-js

尚、エラーメッセージに出ている「To install them~」をやっても、解決出来ませんでした。

core-jsとは

ここで出てきたcore-jsとは、以下のGithubで公開されている、Javascriptの標準的なライブラリで、2020年までのECMAScriptのpolyfill(ECMAScriptに存在しない代替コードやライブラリ)が含まれているものらしい...。
zloirockという方がメンテを行ったりされたそうだが、解説等が調べても全く出てきませんでした...。
調べた限りだと、これを使うことで最新のJavaScriptをIEなどどのブラウザでも動かすことができたりするそう。
https://github.com/zloirock/core-js

まとめ

core-jsについては「JavaScriptをどのブラウザでも動かさせるツール」というものだと認識しましたが、詳しいものを見つけることが出来なかった為、知識をどこかで得たいと思います。
今回のエラーでは、Vuetifyを動かす為の関数やスクリプトを入れていなかった為に起きたのだろうと想定されます。

参考文献

run serveしたらVuetifyでエラーが起きた
core-jsがメンテされていない理由→プロジェクトは継続する
polyfill、babelとは?jsをどのブラウザでも動くようにしてくれる。(IE対応)

3
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?