Module build failed from node_modulesvue-loaderlibindexjsTypeError Cannot read properties of undefined reading parseComponent报错const path = requirepathconst scssVariables = requiresrcstylesvariablessc
这个错误通常是由于vue-loader版本不兼容引起的。请尝试以下几种解决方法:
-
升级
vue-loader和vue-template-compiler到最新版本:npm install vue-loader@latest vue-template-compiler@latest --save-dev -
如果你使用的是
vue-cli,可以尝试升级@vue/cli到最新版本:npm install @vue/cli@latest -g -
检查你的
package.json文件,确保所有相关的依赖项都已正确安装。 -
删除你的
node_modules文件夹,并重新安装依赖:rm -rf node_modules npm install
如果以上方法都不能解决问题,可能是其他配置或代码引起的问题。请提供更多关于你的项目的详细信息,以便我能够更好地帮助你解决问题。
原文地址: http://www.cveoy.top/t/topic/iQ4T 著作权归作者所有。请勿转载和采集!