老师!求助!
来源:3-11 使用 svg-sprite-loader 处理 svg 图标
菜鸟轮回
2022-01-18
按照3-11的课程,照着老师敲了一遍vue.config.js。运行时报错。报错信息如下:
ERROR TypeError: Cannot read properties of undefined (reading ‘add’)
TypeError: Cannot read properties of undefined (reading ‘add’)
at chainWebpack (D:\imooc-admin\vue.config.js:10:15)
at D:\imooc-admin\node_modules@vue\cli-service\lib\Service.js:236:40
at Array.forEach ()
at Service.resolveChainableWebpackConfig (D:\imooc-admin\node_modules@vue\cli-service\lib\Service.js:236:26)
at Service.resolveWebpackConfig (D:\imooc-admin\node_modules@vue\cli-service\lib\Service.js:240:48)
at PluginAPI.resolveWebpackConfig (D:\imooc-admin\node_modules@vue\cli-service\lib\PluginAPI.js:132:25)
at serve (D:\imooc-admin\node_modules@vue\cli-service\lib\commands\serve.js:75:31)
at Service.run (D:\imooc-admin\node_modules@vue\cli-service\lib\Service.js:230:12)
at Object. (D:\imooc-admin\node_modules@vue\cli-service\bin\vue-cli-service.js:36:9)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
1回答
-
Sunday
2022-01-19
你好
如果仅从这个错误里面来看,问题应该在 vue.config.js 的第十行
at chainWebpack (D:\imooc-admin\vue.config.js:10:15)
但是具体的错误原因从这个报错中没有办法看到,你可以尝试贴一下你的 vue.config.js 的配置,看看能不能找到问题
012022-01-19
相似问题