A
A
Aleynik_A2018-02-14 23:26:06
Sass
Aleynik_A, 2018-02-14 23:26:06

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.
5a84998f6ba1a056319360.png
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

1 answer(s)
N
Nikolai Shabalin, 2018-02-15
@nikolayshabalin

It's hard.
Try everything.
Check your environment first.

node -v 
npm -v 
gulp -v

everything should show versions
Check dependency versions? I would like it to be fresher =)
Then create a task only about sass.
gulp.task('sass', function() {
  return gulp.src('app/sass/main.sass')
    .pipe(sass())
    .pipe(gulp.dest('app/css'))
})

Try to compile without watch, just
If there is no result, then the matter is in the paths.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question