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

"Vue.js: scss-loader error"

Module build failed: TypeError: this.getResolve is not a function - Vue.js: scss 적용시 발생하는 에러

Install in vue.js

> npm i -D node-sass sass-loader

Error

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

Reason

vue-cli(webpack v3.x ~ 4.4x)로 생성된 프로젝트와 sass-loader 8.0 버전이 호환이 되지 않기 때문에 발생하는 것이었습니다.

Solution

npm uninstall sass-loader
npm i -D sass-loader@7.3.1

refs: github issue: webpack-contrib/sass-loader