解决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里面添加:

 

 

posted @ 2020-02-19 12:59  dekevin  阅读(590)  评论(0编辑  收藏  举报