Currently, I am utilizing a node-sass
command to compile individual SCSS modules within a UI library. While things generally work smoothly or with minor adjustments to the @imports
of the modules, I occasionally encounter an error that leaves me puzzled.
For instance:
node-sass -i scss/components/alert-banner/module.scss -o css/components/alert-banner/ --importer=../node_modules/node-sass-tilde-importer
However, there are times when I come across this perplexing error message:
{
"status": 1,
"file": "/Users/kehyde/Desktop/collab-ui/core/scss/components/alert-banner/alert-banner.scss",
"line": 3,
"column": 10,
"message": "no mixin named exports",
"formatted": "Error: no mixin named exports\n
on line 3 of scss/components/alert-banner/alert-banner.scss\n
from line 6 of scss/components/alert-banner/module.scss\n>> @include
exports('md-alert-banner') {\n\n ---------^\n"
}
This pertains to the specific code line:
@include exports('md-alert-banner') {
.#{$prefix}-alert-banner {
position: relative;
padding: $alert-banner__padding;
text-align: center;
...
Despite my efforts to search through various forums, I have not been able to find a satisfactory explanation. Most discussions either lead me to intricate issue pages or very basic SCSS tutorials.
I suspect that this is more about a gap in my understanding rather than an actual fault in the code itself. Any insights on this matter would be greatly appreciated!