0

I'm using "gulp-sass": 2.1.1 to compile my project. I'm having some issues identifying where the missing files are from. Whats the best way to logout this error information. Is there a flag or something I can set whilst compiling?

Jimi

Jimi
  • 1,867
  • 7
  • 31
  • 55

1 Answers1

1

Make sure you are using .on('error', ...) in your task:

gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
   .pipe(sass().on('error', sass.logError))
   .pipe(gulp.dest('./css'));
});
Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70
  • Hi There, I did try this but it doesn't seem to work. I get the stack trace in the console but I'd like to get the context of where the file is failing. Seems like it's very difficult to do this. Anything else I can try? – Jimi Apr 06 '16 at 06:20
  • I'm afraid that's the only logging option I know of. There used to be a `sass({errLogToConsole: true})`, but I don't think that exists anymore. – Sven Schoenung Apr 06 '16 at 07:02
  • My implementation is custom, probably the reason it's not working for me. I did read through the docs, before posting... and saw the implementation you posted. – Jimi Apr 07 '16 at 04:22