首页 > 建站教程 > 前端框架 >  Module build failed: TypeError: this.getResolve is not a function正文

Module build failed: TypeError: this.getResolve is not a function

我爱模板网在开发vue插件时,遇到了下面的错误提示

Module build failed: TypeError: this.getResolve is not a function

    at Object.loader (H:\test\yx-bpmn-design\node_modules\sass-loader\dist\index.js:52:26)


 @ ./package/theme/element-variables.scss 4:14-210 13:3-17:5 14:22-218

 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/plugin/yx-bpmn-design.vue

 @ ./src/plugin/yx-bpmn-design.js

 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/dev/dev-yx-bpmn-design.vue

 @ ./src/dev/dev-yx-bpmn-design.vue

 @ ./src/router/index.js

 @ ./src/main.js

 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js


截图如下:


1.png


这是因为sass-loader版本问题导致的,降低版本即可,执行下面的命令重新安装sass-loader,即可解决问题:

npm install sass-loader@7.3.1 --save-dev