Home  >  Q&A  >  body text

Sass error: File already loaded: @import '~src/css/quasar.variables.scss', 'quasar/src/css/variables.sass'; src\css\quasar.variables.scss

I am using the quasar framework and encountered the above error when compiling the project

模块构建失败(来自./node_modules/sass-loader/dist/cjs.js):
SassError:此文件已经被加载。
  ╷
1 │ @import '~src/css/quasar.variables.scss','quasar/src/css/variables.sass';
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  srccssquasar.variables.scss 1:9  root stylesheet
P粉038856725P粉038856725348 days ago683

reply all(1)I'll reply

  • P粉680487967

    P粉6804879672023-11-07 10:34:51

    During the routing process, I passed the wrong path.

    Before

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

    after

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

    I forgot to pass the path of the component "src/pages/"

    reply
    0
  • Cancelreply