Please return Sass errors to the browser, too

When returning a Sass error, rendering it to the console isn’t good enough for me personally. How is it possible to output the error message to the browser, too, so it’s evident my syntax is invalid?

Hello,

I solved this by using gulp-notify, which display desktop notifications.
Install it by putting it in your package.json in devDepencies and modify your gulpfile like this :

22. var notify       = require('gulp-notify');
...
77. var cssTasks = function(filename) {
78. return lazypipe()
79.    .pipe(function() {
80.      return gulpif(!enabled.failStyleTask, plumber({errorHandler: notify.onError("Error: <%= error.message %>")}));
81.    })

This should “just work” ™ and you’ll get desktop notifications.

2 Likes

@jchapron Thanks a bunch!

Did this work for you? I’m not getting anything on my Desktop.

Yes, @jchapron’s solution did work for me. I’m using with Sage 8.2.1 though. I assume the CSS errors show up in your Terminal?

Then, on your Mac, check your Notifications (under System Preferences). Make sure terminal-notifier is also enabled to display banners.

Thanks for the reply.

I’m using 8.3.

They’re showing up fine inside of terminal. I do have terminal notifier set to display banners also.

They’re firing fine on other projects. Just not with this.

Just to confirm this worked for me and is AWESOME!