Mixins may not be defined within control directives or other mixins
See original GitHub issueIssue type
I’m submitting a … (check one with “x”)
- bug report
- feature request
Issue description
Current behavior:
Crashes when compiling, with the message:
ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--8-3!./src/app/@theme/styles/styles.scss
Module build failed:
@mixin hover-checked-border($color) {
^
Mixins may not be defined within control directives or other mixins.
in /Users/.../node_modules/@nebular/theme/styles/global/bootstrap/_custom-forms.scss (line 8, column 10)
Expected behavior:
the app should compile
Steps to reproduce:
Not sure here, it happened after messing with the packages organization. I am posting here because it seems like a valid bug, as sass shouldn’t allow nested mixins (I’m not an expert, I just read this)
Other information:
Angular, Nebular
Angular 5.2.9
Nebular 2.0.0-rc.6
Please delete this issue if the nested mixin code is valid indeed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Mixins may not be defined within control directives or other ...
Now, i found the solution there was an issue with node-sass pacakge. so install the. npm i node-sass@4.8.1. package then it works.
Read more >SCSS: Functions may not be defined within control directives
Hello,. I got this message after compiling the file mdb.scss: Error: Functions may not be defined within control directives or other mixins.
Read more >Mixins may not be defined within control directives or other ...
Mixins may not be defined within control directives or other mixins. ... Mixins may not be defined within control directives or other mixins....
Read more >mixin and @include - Sass
Mixins allow you to define styles that can be re-used throughout your stylesheet. They make it easy to avoid using non-semantic classes like...
Read more >Node Sass error in Angular: Mixins may not be defined within ...
Coding example for the question Node Sass error in Angular: Mixins may not be defined within control directives or other mixins-angular.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wondering about the status of this fix? The workaround doesn’t fix everything for me. after building with node-sass@4.8.1 I get the following =>
ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref–8-3!./src/app/@theme/styles/styles.scss Module build failed: undefined ^ Argument
$color
oflighten($color, $amount)
must be a colorBacktrace: node_modules/@nebular/theme/components/checkbox/_checkbox.component.theme.scss:13, in function
lighten
@nnixaa no problem, I have removed my other comments. So you would like me to create a new issue on something that you are considering fixed? I was simply wondering when your fixes were planned to be released. I will open a new issue, thanks.