vue中自动导入导致的数十个报错,ERROR in ./node_modules
我在写路由跳转的时候,突然运行后一下出现了几十个报错,都是了来自于 ./node_modules的
报错如下:
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-16ERROR 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-16ERROR 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-16ERROR 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-16webpack compiled with 68 errors
原因:系统自动导入了express,也有可能是其他的包,自行检查一下有没有新增的导入
解决方法:删掉就可以了
vue中自动导入导致的数十个报错,ERROR in ./node_modules相关推荐
- 安装32位mysql报错_在CentOS中安装32位或64位MySql报错error: Failed dependencies解决办法...
在CentOS中安装MySql报错error: Failed dependencies解决办法 安装64位MySql报错内容如下: error: Failed dependencies: libaio ...
- app.vue中引用图片src=“../assets/logo.png“报错未找到图片
发现在views或components里的vue里用src="-/assets/logo.png"是没有问题的,但是在app.vue里这么使用出现报错: This relative ...
- 解决Vue中重复点击相同路由控制台报错问题
vue-router 升级到3.1.x 后,重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但也不能视而不见. 报错信息 报错原因 vue router ≥ v3.1 后 ,回调形式改成prom ...
- 四种解决Vue中重复点击相同路由控制台报错问题( Avoided redundant navigation to current location)
vue-router 升级到3.1.x 后,重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但是看的就不舒服. 报错信息 Uncaught (in promise) NavigationDupl ...
- Cocos2d-x的Eclipse工程中:导入91sdk后AndroidMainfest.xml报错
1.错误如下: 报错文字内容: error: Error: String types not allowed (at 'configChanges' with value 'orientation|k ...
- window.onresize在vue中只能使用一次,自适应resize报错
1.window.onresize不能重复使用,因为onresize是一个回调,当它发生变化时,会覆盖前一个 2.但是有业务场景需要多个组件进行监听,此时可以使用 window.addEventLis ...
- vue中通过arr.length获取数组长度报错:Error in render: “TypeError: Cannot read property ‘length‘ of undefined“
刚开始是通过arr.length获取数组长度的! 结果控制台报错: Error in render: "TypeError: Cannot read property 'length' of ...
- 【操作经验】Mysql如何加载导入大批量数据,解决报错ERROR 3948 (42000)
前言:新装mysql,遇到ERROR 3948 (42000):Loading local data is disabled; this must be enabled on both the cli ...
- 【报错记录】MySQL向数据库中导入txt文件报错ERROR 1148 (42000): The used command is not allowed with this MySQL version
背景 想将txt文件导入到数据库中,输入LOAD DATA LOCAL INFILE "D:\dbms_lab\department.txt" INTO TABLE DEPARTM ...
最新文章
- 基于Flink SQL构建流批一体实时数仓
- 浅谈C语言的基本数据类型
- c语言字符串加减_C语言中指针的介绍
- linux lvm 调整分区大小,linux调整lvm分区大小(/home分区过大,/root分区过小)
- 练习5 键盘输入一个年份 判断年份 是否为闰年
- SAP License:供应商寄售业务(合作伙伴不存在修改 443消息号)
- 想加入Google AI中国团队?你可能得飞去美国面试
- PyQt5点击菜单栏弹出新窗口,解决新窗口闪退的实现方法
- lstm 变长序列_Pytorch 是如何处理变长序列的
- 怎么用计算机算弧度制,怎么设置计算器 把度数转化为弧度
- vue 导出excel
- sai笔记5-详细上色教程(适合有耐心的观众)
- Mecanim 工作流
- 从四面体数据中提取表面
- 中国近12个月以来的搜索引擎市场份额
- Windows与嵌入式linux设备数据传送工具——tftpd32软件使用说明
- 超级计算机计算峰值,世界运算最快计算机,中国神威·太湖之光(其峰值计算速度达每秒1...
- 初学者学习JAVASCRIPT很吃力怎么办?到底该如何学习JS?
- Maven2部署构件到Nexus时出现的Failed to transfer file错误
- ip网络广播系统服务器,IP网络广播服务器