Answer the question
In order to leave comments, you need to log in
Compiling scss to gulp with @import doesn't work?
Hello, when trying to compile a .scss file that has at least one import, an unknown error appears:
Error in plugin 'sass'
Message:
scss\styles.scss
undefined
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'));
});
gulp.task('sass:watch', function () {
gulp.watch('./scss/**/*.scss', ['sass']);
});
@import "mixins";
@import "variables";
//...
Answer the question
In order to leave comments, you need to log in
It looks like this issue only affects Windows users
https://github.com/dlmanning/gulp-sass/issues/438
UPD: The problem was solved when I moved the project folder to the root of drive C
Try using single quotes instead of double quotes in your import
@import 'mixins';
@import 'variables';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question