Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GruntJS "bus error grunt watch"

I'm having an error with GruntJS when I try to run a grunt watch. It works fine, until there is a change in the file it is watching, then, it looks something like this:

Running "watch" task
Waiting...[1]    2464 bus error  grunt watch

The number 2464 changes. It seems to be the port that grunt is watching on? But, I'm not sure. Here is my Gruntfile:

module.exports = function (grunt) {
"use strict";

grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    sass: {
        dist: {
            options: {
                style: 'compact'
            },
            files: {
                'css/style.css': 'sass/style.scss',
            }
        }
    },
    watch: {
        files: 'sass/style.scss',
        tasks: ['sass']
    }
});

grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');

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

Thanks in advance for all the help!

like image 533
xanesis4 Avatar asked Jan 02 '14 16:01

xanesis4


1 Answers

Do you use Osx maverick?

checkout this: https://github.com/gruntjs/grunt-contrib-watch/issues/204

You need to upgrade node.js to 0.10.22 version:

# Check your version of Node.js. v0.10.20 will still be broken
node –v

# clean your node cache
sudo npm cache clean –f

# install node binary manager ’n’
sudo npm install -g n

# use said ’n’ manager to install latest stable version
sudo n stable

source: http://stephentvedt.com/blog/2013/11/16/grunt-js-watch-bus-error/

like image 169
Slawa Eremin Avatar answered Oct 16 '22 15:10

Slawa Eremin