这个错误通常是由于vue-loader版本不兼容引起的。请尝试以下几种解决方法:

  1. 升级vue-loadervue-template-compiler到最新版本:

    npm install vue-loader@latest vue-template-compiler@latest --save-dev
    
  2. 如果你使用的是vue-cli,可以尝试升级@vue/cli到最新版本:

    npm install @vue/cli@latest -g
    
  3. 检查你的package.json文件,确保所有相关的依赖项都已正确安装。

  4. 删除你的node_modules文件夹,并重新安装依赖:

    rm -rf node_modules
    npm install
    

如果以上方法都不能解决问题,可能是其他配置或代码引起的问题。请提供更多关于你的项目的详细信息,以便我能够更好地帮助你解决问题。

Module build failed from node_modulesvue-loaderlibindexjsTypeError Cannot read properties of undefined reading parseComponent报错const path = requirepathconst scssVariables = requiresrcstylesvariablessc

原文地址: http://www.cveoy.top/t/topic/iQ4T 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录