0

when I run grunt in my terminal, I got this error message, can anyone tell me why? I got an error message:Loading "Gruntfile.js" tasks...ERROR

SyntaxError: Unexpected identifier Warning: Task "default" not found. Use --force to continue.

module.exports = function(grunt){
require('load-grunt-tasks')(grunt);

var config = grunt.file.readYAML('Gruntconfig.yml');

grunt.initConfig({
    sass:{
        dist:{              
            src: config.scssDir+'style.scss',
            dest: config.cssDir+'style.css'
        }
    },
    concat:{
        dist:{
            src: config.jsSrcDir+'*.js',
            dest: config.jsConcatDir+'app.js'
        }
    },
    jshint:{
        options:{
            "eqeqeq": true
        }
        all:[
            'Gruntfile.js',
            config.jsSrcDir+"*.js"
        ]
    },
    watch:{
        sass:{
            files: config.scssDir+'**/*.scss',
            tasks:['sass']
        }
    }
});

grunt.registerTask('default',['jshint',
    'sass','concat','watch']);};
dianalh1212
  • 7
  • 1
  • 1
  • 5

1 Answers1

0

It means it can't compile the json in the gruntfile.

You are lacking a comma

jshint:{
    options:{
        "eqeqeq": true
    }<--- add comma here
    all:[
        'Gruntfile.js',
        config.jsSrcDir+"*.js"
    ]
},
Tom Glover
  • 2,996
  • 23
  • 23