vue报错篇

以下报错导致项目启动动不了   

 

ERROR in ./node_modules/import-fresh/index.js 7:11-26
Module not found: Error: Can't resolve 'path' in 'D:\Users\17943\Desktop\电商后台管理\app\node_modules\import-fresh'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
        - install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "path": false }
 @ ./node_modules/@eslint/eslintrc/lib/config-array-factory.js 100:18-41
 @ ./node_modules/@eslint/eslintrc/lib/index.js 9:15-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 87:15-42
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./src/main.js 16:0-30 61:10-16

ERROR in ./node_modules/resolve-from/index.js 9:11-26
Module not found: Error: Can't resolve 'path' in 'D:\Users\17943\Desktop\电商后台管理\app\node_modules\resolve-from'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
        - install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "path": false }
 @ ./node_modules/import-fresh/index.js 9:18-41
 @ ./node_modules/@eslint/eslintrc/lib/config-array-factory.js 100:18-41
 @ ./node_modules/@eslint/eslintrc/lib/index.js 9:15-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 87:15-42
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./src/main.js 16:0-30 61:10-16

ERROR in ./node_modules/resolve-from/index.js 11:13-30
Module not found: Error: Can't resolve 'module' in 'D:\Users\17943\Desktop\电商后台管理\app\node_modules\resolve-from'
 @ ./node_modules/import-fresh/index.js 9:18-41
 @ ./node_modules/@eslint/eslintrc/lib/config-array-factory.js 100:18-41
 @ ./node_modules/@eslint/eslintrc/lib/index.js 9:15-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 87:15-42
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./src/main.js 16:0-30 61:10-16

ERROR in ./node_modules/resolve-from/index.js 13:9-22
Module not found: Error: Can't resolve 'fs' in 'D:\Users\17943\Desktop\电商后台管理\app\node_modules\resolve-from'
 @ ./node_modules/import-fresh/index.js 9:18-41
 @ ./node_modules/@eslint/eslintrc/lib/config-array-factory.js 100:18-41
 @ ./node_modules/@eslint/eslintrc/lib/index.js 9:15-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 87:15-42
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./src/main.js 16:0-30 61:10-16

ERROR in ./node_modules/rimraf/rimraf.js 11:13-30
Module not found: Error: Can't resolve 'assert' in 'D:\Users\17943\Desktop\电商后台管理\app\node_modules\rimraf'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
        - install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "assert": false }
 @ ./node_modules/flat-cache/src/del.js 1:13-35
 @ ./node_modules/flat-cache/src/cache.js 13:10-26
 @ ./node_modules/file-entry-cache/cache.js 26:20-41
 @ ./node_modules/eslint/lib/cli-engine/lint-result-cache.js 31:21-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 108:22-52
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./node_modules/flat-cache/src/del.js 1:13-35
 @ ./node_modules/flat-cache/src/cache.js 13:10-26
 @ ./node_modules/file-entry-cache/cache.js 26:20-41
 @ ./node_modules/eslint/lib/cli-engine/lint-result-cache.js 31:21-48
 @ ./node_modules/eslint/lib/cli-engine/cli-engine.js 108:22-52
 @ ./node_modules/eslint/lib/cli-engine/index.js 3:15-38
 @ ./node_modules/eslint/lib/api.js 7:15-38
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/goods/Add.vue?vue&type=script&lang=js& 143:0-36
 @ ./src/components/goods/Add.vue?vue&type=script&lang=js& 1:0-215 1:231-234 1:236-448 1:236-448
 @ ./src/components/goods/Add.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./src/router/index.js 13:0-45 51:17-20
 @ ./src/main.js 16:0-30 61:10-16

webpack compiled with 68 errors

为什么会报这个错呢

因为这个

 

import { SourceCode } from 'eslint'

不知道为什么会自动给我加上了这个

删掉就好了

  • 7
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 11
    评论
Vue中使用echarts,你可以通过全局引入或按需引入的方式来使用echarts库。全局引入的方法是在main.js文件中引入echarts,并将其挂载在Vue的原型上,以便在整个项目中可以直接通过this.$echarts来使用echarts库。具体代码如下: ```javascript // main.js import echarts from "echarts"; Vue.prototype.$echarts = echarts; ``` 这样,在Vue的组件中就可以通过this.$echarts来调用echarts库的各种功能了。比如你可以在组件的mounted钩子函数中使用this.$echarts来初始化一个echarts实例,并使用其提供的API来绘制图表。 另外,如果你只需要使用一部分echarts功能,你也可以按需引入echarts的模块。具体的使用方法可以参考echarts官方文档或者其他相关资源。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Vue使用echarts(完整版,解决各种报错)](https://blog.csdn.net/geidongdong/article/details/122561517)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [在vue中使用Echart图表。小白](https://blog.csdn.net/qq_43153895/article/details/108214450)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学无止境s

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值