VUE项目运行报错解决

* core-js/modules/es.array.push.js in ./node_modules/.store/@[email protected]/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js, ./node_modules/.store/[email protected]/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/.store/[email protected]/node_modules/babel-loader/lib!./node_modules/.store/[email protected]/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/.store/[email protected]/node_modules/vue-loader/lib??vue-loader-options!./src/components/Breadcrumb/index.vue?vue&type=script&lang=js& and 6 others
* core-js/modules/es.error.cause.js in ./node_modules/.store/@[email protected]/node_modules/@babel/runtime/helpers/esm/classCallCheck.js, ./node_modules/.store/[email protected]/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/.store/[email protected]/node_modules/babel-loader/lib!./node_modules/.store/[email protected]/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/.store/[email protected]/node_modules/vue-loader/lib??vue-loader-options!./src/components/modal/modal.vue?vue&type=script&lang=js& and 1 other
* core-js/modules/es.object.proto.js in ./node_modules/.store/@[email protected]/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js, ./src/utils/request.js
* core-js/modules/es.reflect.to-string-tag.js in ./node_modules/.store/@[email protected]/node_modules/@babel/runtime/helpers/esm/createSuper.js
* core-js/modules/es.regexp.dot-all.js in ./src/utils/index.js
* qs in ./src/api/resource.js, ./src/utils/request.js
* svg-baker-runtime/browser-symbol in ./src/assets/icons/svg/wechat.svg

 

1、对于core-js相关的报错,我的package.json中的core-js版本是3.6.5,解决办法是将这个package.json中的core-js删掉,node_modules里面core-js相关的文件夹删掉,terminal执行命令:

cnpm i core-js

安装默认版本的core-js

2、对于最后两行的报错,首先执行

cnpm i qs --save

然后执行

cnpm i svg-baker-runtime --save

你可能感兴趣的:(vue.js,javascript,前端)