错误解决:These dependencies were not found: core-js/modules/es.array.push.js

错误描述
执行npm run dev后报错:

These dependencies were not found:
* core-js/modules/es.array.push.js in ./node_modules/@babel/runtime/helpers/objectSpread2.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-pluvue?vue&type=script&lang=js& and 9 others
* core-js/modules/es.error.cause.js in ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js, ./src/utils/request.js and 2 others
* core-js/modules/es.object.proto.js in ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
* core-js/modules/es.regexp.dot-all.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_moduland 1 other
To install them, you can run: npm install --save core-js/modules/es.array.push.js core-js/modules/es.error.cause.js core-js/modules/es.object.proto.js core-js/modules/es.re

解决方式
删除node_modules中的3个文件夹:

core-js
core-js-compat
core-util-js

之后,再执行
npm i core-js --save

你可能感兴趣的:(javascript,elasticsearch,开发语言,vue)