Skip to content

"SassError: expected selector." (mixins) #197

Open
@n4ks

Description

@n4ks

Hello!
I'm trying to import mixins using this library, but I get this error:

ERROR in ./assets/styles/index.scss (./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./node_modules/sass-resources-loader/lib/loader.js??ref--7-oneOf-1-4!./assets/styles/index.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: expected selector.
   ╷
19 │ @mixin test{
   │  ^ 
   ╵
  assets\styles\index.scss 19:2  root stylesheet

nuxt.config.js

buildModules: [
		"@nuxt/typescript-build",
		'@nuxtjs/style-resources',
		"@nuxtjs/svg",
	]
styleResources: {
    scss: ['~assets/vars.scss', '~assets/_mixins.scss',],
      },

_mixins.scss

@mixin test {
	list-style: none;
}

package.json

"sass": "^1.38.1",
"sass-loader": "^10.1.1",
"nuxt": "^2.15.7",
"@nuxtjs/style-resources": "^1.2.1",

This error is displayed dozens of times referring to different files. (I don't use this mixin anywhere at the moment). Could you help me understand what could be causing this problem? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions