Installing Grunt on Ubuntu 14.04

I tried to install grunt on Ubuntu 14.04 and wrote grunt serve

I am getting this error.

Warning: Task "serve" not found. Use --force to continue.

Aborted due to warnings.

  1. I have Gruntfile.js in my project folder next to package.json file
  2. When I write grunt –version I get:

         grunt-cli v0.1.13
         grunt v0.4.5
  3. I tried @Tom P’s answer:

  4. I have read Grunt documentation

  5. All Installations done through sudo

  6. Tried this as well

This is the Gruntfile sample code I took from Official Grunt documentation.

 module.exports = function(grunt) {
      // Project configuration.
      pkg: grunt.file.readJSON('package.json'),
      uglify: {
                 options: {
                 banner: '/*! <%= %> <%="yyyy-mm-dd") %> */n'
      build: {
                 src: 'src/<%= %>.js',
                 dest: 'build/<%= %>.min.js'

    // Load the plugin that provides the "uglify" task.

   // Default task(s).
   grunt.registerTask('default', ['uglify']);


Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.