Grunt-sass, no error log when "watch"

I am using the following grunt tasks

Soil-Sass Soil-in-hours Soil-AutoPrefixNodes Node-bourbon task

(there are a few more tasks like uglify, spritesmith and haml that I did not account for in this example)

My grunt file looks like this:

module.exports = function(grunt) {

    pkg: grunt.file.readJSON('package.json'),

    sass: {
        options: {
            sourceMap: true,
            outputStyle: 'compressed',
            imagePath: 'assets/css/img',
            includePaths: require('node-bourbon').includePaths
        dist: {
            files: {
                'assets/css/app.css': 'assets/sass/app.scss'

    autoprefixer: {
      options: {
         browsers: ['last 2 version', 'ie 8', 'ie 9'],
         silent : false
      dev: {
        src: 'assets/css/app.css',
        dest: 'assets/css/post.css'

    watch: {
      options: {
          livereload: true
      sass: {
        files: ['assets/sass/**/*.scss', 'assets/sass/*.scss'],
        tasks: ['sass:dist', 'autoprefixer:dev']


  grunt.registerTask('default', ['watch', 'sass']);



It works. However, if there is an error in my sass file, nothing is reported. For example, if I try to use a $ variable that does not exist, no errors are reported in my terminal

Here are two subsequent logs, the first compiler successfully with errors. The second one does not compile (since there is an undefined variable in the scss file)

Completed in 1.712s at Sun Sep 28 2014 15:23:17 GMT+0100 (GMT Daylight Time) - Waiting...
>> File "assets\sass\app.scss" changed.
Running "sass:dist" (sass) task
File assets/css/app.css created.
File assets/css/ created.

Running "autoprefixer:dev" (autoprefixer) task
File assets/css/post.css created.

Done, without errors.

Running "watch" task
>> File "assets\sass\app.scss" changed.
Running "sass:dist" (sass) task
Completed in 1.656s at Sun Sep 28 2014 15:29:25 GMT+0100 (GMT Daylight Time) - Waiting...


Does anyone know why errors are not being logged?

I used libsass and bourbon instead of compass in the process of restoring my sass patplate. So I expect to run into a lot of errors during the process, so I really need to know what those errors are.



source to share

All Articles