[Fixed]Syntax Error: TypeError: this.getOptions is not a function

Syntax Error: TypeError: this.getOptions is not a function.

This error is due to an Error while running Vue Project.

The Errors Message is:

Syntax Error: TypeError: this.getOptions is not a function

 @ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/article/article.vue?vue&type=style&index=0&id=53e7acee&lang=scss&scoped=true& 4:14-480 15:3-20:5 16:22-488
 @ ./src/pages/article/article.vue?vue&type=style&index=0&id=53e7acee&lang=scss&scoped=true&
 @ ./src/pages/article/article.vue
 @ ./src/router/config.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.3.101:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js babel-polyfill whatwg-fetch ./src/main.js

The reason for this Error is that the installed version of SCSS loader is higher.

Also Read | How to Remove “Devtools failed to parse source-map” Warning

Solution:

Uninstall the Higher version and install the lower version.

npm uninstall --save sass-loader // uninstall
npm i -D sass-loader@8.x // install
npm uninstall --save node-sass //uninstall
npm i node-sass@4.14.1 // install
admin
admin

Leave a Reply

Your email address will not be published. Required fields are marked *