Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
n4ks opened this issue Apr 28, 2022 · 0 comments
Open

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

n4ks opened this issue Apr 28, 2022 · 0 comments

Comments

@n4ks
Copy link

n4ks commented Apr 28, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant