解决npm报错:Module build failed: TypeError: this.getResolve is not a function

1、sass-loader的版本过高导致的编译错误,当前最高版本是8.x,需要退回到7.3.1

  运行:

    npm uninstall sass-loader(卸载当前版本)

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

2、如果上面的方法不行,或者又产生其他相关的错误,可以尝试一下在webpack.base.config.js里面添加:

 

欢迎评论区留言或探讨更多相关问题。

原文地址:https://www.cnblogs.com/blucesun/p/11463426.html