Answer the question
In order to leave comments, you need to log in
Gulp-sass not working, what's the problem?
var gulp = require('gulp');
var rename = require('gulp-rename');
var sass = require('gulp-sass')
function conv(done) {
gulp.src('./scss/style.scss')
.pipe(sass({
errorLogToConsole: true
}))
.on('error', console.error.bind(console))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./css/'));
done()
}
gulp.task(conv)
Throws an error:
[21:53:14] Using gulpfile D:\#www\gulpfile.js
[21:53:14] Starting 'conv'...
Error in plugin "gulp -sass"
Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:
var sass = require('gulp-sass')(require('sass'));
[21:53:14] The following tasks did not complete: conv
[21:53:14] Did you forget to signal async completion?
Answer the question
In order to leave comments, you need to log in
Here is the problem, it is described and the causes are shown in the Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:
var sass = require('gulp-sass')(require('sass'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question