Search code examples
javascriptvue.jsquasar-frameworkquasar

SassError: This file is already being loaded. @import '~src/css/quasar.variables.scss', 'quasar/src/css/variables.sass'; src\css\quasar.variables.scss


I am using the quasar framework and while compiling the project I'm getting the above error

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: This file is already being loaded.
  ╷
1 │ @import '~src/css/quasar.variables.scss', 'quasar/src/css/variables.sass';
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src\css\quasar.variables.scss 1:9  root stylesheet

Solution

  • while routing I was passing the wrong path.

    Before

    Route.setViewResolver( component => require( "src/" + component ).default );
    

    After

    Route.setViewResolver( component => require( "src/pages/" + component ).default );
    

    I have missed the path where to pass the component "src/pages/"