Kaustubh Singh
Kaustubh Singh

Reputation: 1

Facing Issue while launching grunt from command prompt

Loading "Gruntfile.js" tasks...ERROR >> SyntaxError: Unexpected string Warning: Task "default" not found. Use --force to continue. Aborted due to warnings. getting this error while launching grunt from command promt can anybody help on this issue?

my Gruntfile.js file is:-

'use strict';

module.exports = function (grunt) {

  grunt.initConfig({

require('time-grunt')(grunt);


require('jit-grunt')(grunt);


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


  jshint: {
    options: {
      jshintrc: '.jshintrc',
      reporter: require('jshint-stylish')
    },

    all: {
      src: [
        'Gruntfile.js',
        'app/scripts/{,*/}*.js'
      ]
    }
  }
});

grunt.registerTask('build', [
  'jshint'
]);

grunt.registerTask('default',['build']);

  });
};

Upvotes: 0

Views: 32

Answers (1)

Nitesh
Nitesh

Reputation: 1550

Can you please try including this?

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('build', [
  'jshint'
]);

Upvotes: 0

Related Questions