Have a Question?

If you have any question you can ask below or enter what you are looking for!

Question Detial

Bus Error: 10 when running grunt-sass

2:20pm 17th February 2016 8631 Views

I am running grunt-sass to try and compile my SCSS, but any time I run I get a Bus Error: 10. Using Node version 5.6.0, and an image of the error can be found here: http://i.imgur.com/m1LFydl.png

Anyone come across this before?

Gruntfile.js:

module.exports = function(grunt) {

    // Configure tasks
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        uglify: {
            dev: {
                options: {
                    beautify: true,
                    mangle: false,
                    compress: false,
                    preserveComments: 'all'
                },
                src: 'src/js/*.js',
                dest: 'js/script.min.js'
            },
            build: {
                src: 'src/js/*.js',
                dest: 'js/script.min.js'
            }

        },
        sass: {
            dev: {
                options: {
                    outputStyle: 'expanded'
                },
                files: {
                    'src/lad.css': 'src/sass/style.scss'
                }
            }
        },
        watch: {
            js: {
                files: 'src/js/*.js',
                tasks: ['uglify:dev']
            }
        }
    });

    // Load the plugins
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-sass');

    // Register tasks

    grunt.registerTask('default', ['uglify:dev', 'sass:dev']);

    grunt.registerTask('build', ['uglify:build']);
};

Answers

Cy Rossignol

8:29am 17th February 2016

It may be version error. Try to upgrade nodejs and/or grunt. The error is already here reported :

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

Wiktor Stribiżew

12:47pm 24th February 2016

Okay the issue here was that I had set up my SCSS wrong, a module was importing itself. In this case it was Bourbon Neat, and bourbon was importing itself.