Answer the question
In order to leave comments, you need to log in
Why is css not compiling via gulp-sass on Win7?
I can't figure out why css doesn't compile via gulp on Windows 7. The Gulp file is quite standard (listed below) and this configuration works fine on MacOS.
On Win7, the problem is also visible in the terminal when you start watch: this line does not appear in the console.
I understand that there are some problems with installing sass. Please help with advice or versions of what could be done wrong.
Content of gulpfile.js:
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync');
gulp.task('sass', function() {
return gulp.src('app/sass/main.sass')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions']
}))
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({
stream: true
}));
})
gulp.task('browser-sync', function(){
browserSync({
server: {
baseDir: 'app'
},
notify: false
});
});
gulp.task('watch', ['browser-sync', 'sass'], function(){
gulp.watch('app/sass/main.sass', ['sass']);
gulp.watch('app/*.html', browserSync.reload);
});
Answer the question
In order to leave comments, you need to log in
It's hard.
Try everything.
Check your environment first.
node -v
npm -v
gulp -v
gulp.task('sass', function() {
return gulp.src('app/sass/main.sass')
.pipe(sass())
.pipe(gulp.dest('app/css'))
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question