Error Handling
vue error 해결법 : vue 2 에서 sass-loader 설치 오류 해결하는법
고수트
2021. 4. 28. 20:34
반응형
vue 버젼 2에서 scss 를 사용하기 위해 sass-loader 를 설치할 경우 아래와 같은 다양한 에러가 순차적으로 발생하면서 어려움을 겪을 때가 있다.
Module build failed: TypeError: this.getOptions is not a function at Object.loader
Module build failed: TypeError: Cannot read property 'toString' of undefined
vue UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
모두 설치한 모듈의 버젼이 현재 vue 2 버젼 또는 웹팩과 맞지않아 발생한 에러이다.
따라서 아래 명령어처럼 적합한 버젼을 명기하여 설치하면 해결된다.
npm i node-sass@4.14.1
npm i sass-loader@7.3.1
반응형