close

[Solved] ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema

Hello Guys, How are you all? Hope You all Are Fine. Today When I am trying to run npm run serve I am facing the following error ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema in vuejs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema Error Occurs ?

I am trying to run npm run serve I am facing following error .

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.
 - options has an unknown property 'indentedSyntax'. These properties are valid:

How To Solve ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema Error ?

  1. How To Solve ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema Error ?

    To Solve ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema Error Here This could be the result of upgrading sass-loader from v7.x to v8.x. Just change vue.config.js as given below.

  2. ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.

    To Solve ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema Error Here This could be the result of upgrading sass-loader from v7.x to v8.x. Just change vue.config.js as given below.

Solution 1

Here This could be the result of upgrading sass-loader from v7.x to v8.x. Just change vue.config.js as given below.

module.exports = {
  css: {
    loaderOptions: {
      sass: {
        sassOptions: {
          ....some options here...
        }
      }
    }
  }
}

Solution 2

 In my case When I comment out the color code lines it builds without error:

    Vue.use(Vuetify, {
      theme: {
        "primary": "#FFCA28",
        "secondary": "#1976D2",
        "accent": "#82B1FF",
        "error": "#FF5252",
        "info": "#2196F3",
        "success": "#4CAF50",
        "warning": "#FB8C00"
      }
    })

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment