D
D
Dmitry Kirillov2016-03-18 15:54:15
css
Dmitry Kirillov, 2016-03-18 15:54:15

Error when compiling Sass (SCSS) via gulp?

Good day to all.
Faced a problem.
Working on:
Windows 8.1
Node -v 5.8.0
Npm -v 3.7.3
Gulp -v 3.9.1
My gulpfile.js

"use strict";

var gulp         = require("gulp"),
  browserSync  = require("browser-sync"),
  sass         = require("gulp-sass");




gulp.task("watch", ["browser-sync", "sass"], function() {
  gulp.watch("src/sass/**/*.scss", ["sass"]);
});




gulp.task("browser-sync", function() {
  browserSync({
    server: {
      baseDir: "src"
    },
    notify: false
  });
});




gulp.task("sass", function() {
  return gulp.src("src/sass/main.scss")
    .pipe(sass().on("error", sass.logError))
    .pipe(gulp.dest("src/css"))
    .pipe(browserSync.reload({stream: true}))
});

Compilation works intermittently. Those. 4 times can (for example) compile, on the 5th time an error, and then again everything is fine.
prntscr.com/agsxbt
My main.scss file
prntscr.com/agsxgj
There is a similar problem on the net, but I did not find a solution.
I would be very grateful for any help.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
codemix, 2016-03-18
@codemix

Everything compiles correctly, you just make mistakes in the sass code, and it gives an error indicating even where the error is.

D
Dmitry Kirillov, 2016-03-18
@Bonauze

Seems to have found the problem.
I work in the latest SublimeText 3
Just when saving through it, I get this error periodically.
I tried to save through notepad ++ I saved
it 20-30 times and no errors.
Maybe someone knows where to "dig" further?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question