Getting error message Module build failed (from ./node_modules/sass-loader/dist/cjs.js) when running npm serve Getting error message Module build failed (from ./node_modules/sass-loader/dist/cjs.js) when running npm serve vue.js vue.js

Getting error message Module build failed (from ./node_modules/sass-loader/dist/cjs.js) when running npm serve


This could be result of upgrading sass-loader from v7.x to v8.x

As stated in release notes, they'v made significant changes to configuration

Check your vue.config.js - if you find something like this:

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

change it to:

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


I am not sure if it's of any use but my npm run build errors at the color codes in theme. 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"      }    })