Vue3 TypeError: this.getOptions is not a function will be raise when wrong sass-loader configuration is made in pakage.json.

Sass is the most mature, stable, and powerful professional grade CSS extension language in the world. [source]

How to fix

How to fix the TypeError: this.getOptions is not a function in the project setup ?

We need to downgrade the sass loader, in order to fix this issue. Remove sass-loader using npm or yarn

yarn remove sass-loader

Now install the version ^10.1.1 , add it to pacakge.json and run the install command

 //package.json ... "dependencies": {     "core-js": "^3.12.1",     "vue": "^3.0.11",     "vuetify": "^2.5.1"   },   "devDependencies": {     "@vue/cli-plugin-babel": "^4.5.13",     "@vue/cli-plugin-eslint": "^4.5.13",     "@vue/cli-service": "^4.5.13",     "@vue/compiler-sfc": "^3.0.11",     "babel-eslint": "^10.1.0",     "eslint": "^6.8.0",     "eslint-plugin-vue": "^7.9.0",     "sass": "^1.34.1",     "sass-loader": "^10.1.1",     "vue-loader-v16": "^16.0.0-beta.5.4"   }, 
yarn install

This will fix error


This free site is ad-supported. Learn more