ERROR Failed to compile with 1 error12:10:49 [0] [0] error in ./src/utils/request.js [0] [0] Module not found: Error: Can't resolve 'querystring' in 'D:\Personal_Files\VSCode\Ego商城后台管理系统\code\vue-ego\src\utils' [0] [0] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. [0] This is no longer the case. Verify if you need this module and configure a polyfill for it. [0] [0] If you want to include a polyfill, you need to: [0] @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/Login.vue?vue&type=script&lang=js& 1:0-25 [0] @ ./src/views/Login.vue?vue&type=script&lang=js& 1:0-199 1:215-218 1:220-416 1:220-416 [0] @ ./src/views/Login.vue 2:0-57 3:0-52 3:0-52 10:2-8 [0] @ ./src/router/index.js 42:19-47 [0] @ ./src/main.js 4:0-30 11:2-8 [0] [0] webpack compiled with 1 error
时间: 2024-04-02 10:33:25 浏览: 178
解决vue安装less报错Failed to compile with 1 errors的问题
看起来你遇到了一个Webpack的错误,说找不到一个叫做'querystring'的模块。这个模块在旧版的Webpack中是默认包含的,但在Webpack5中已经取消了。你需要检查一下你的代码中是否使用了这个模块,并且需要配置一个polyfill来支持它。你可以通过安装'querystring'模块来解决这个问题,使用命令npm install querystring --save来安装。
阅读全文