@include is not available and "no mixin named" error occurs when compiling with gulp-ass

Asked 2 years ago, Updated 2 years ago, 77 views

I get an error when I try to compile the scss file using gulp-sass.
(Although the number of spaces may be different because it is handmade)

Error: src\sass\style.scss
Error: no mixin named test
    Backtrace:
     stdin —Error line
     online error line of stdin
>>@include test;

The error line is the line @include.
The compilation part of gulpfile.js is as follows:
Actually, I used a gulp-plumber, but it didn't change whether I took it out or put it in.

var gulp=require('gulp');
varass = require ('gulp-sass');



gulp.task('ass', function(){
    gulp.src('./src/sass/*.scss')
    .pipe(sass())
    .pipe(gulp.dest('./dist/css'));
});

Writing @mixin is not a problem, but using @include causes an error.

gulp sass

2022-09-30 11:48

1 Answers

I wrote @mixin after @include, I thought the code was definitely correct...
Sorry for the trouble.


2022-09-30 11:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.