Paul Kim
Paul Kim

Reputation: 1

Grunt is throwing error messages

I'm trying to run grunt in my project and I keep getting the errors below. I followed the "Getting Started" on the actual Grunt site and I keep getting this. I've also included the code in my Gruntfile

This is my gruntfile below:

module.exports = function(grunt) {
  Project configuration.
   grunt.initConfig({

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

      compass: {
        dist: {
         options: {
          sassDir: 'sass',
          cssDir: '',
          outputStyle: 'expanded',
          require: 'susy'
    }
  }
},

    uglify: {
     all: {
      files: {
        'site.min.js': ['_/js/app-navigation.js','_/js/plugins.js']
      }
    }
  },

  watch: {
    options: {
     livereload: true
    },
  pages: {
    files: ['**/*.{php, html}']
  },
  css: {
    files: ['sass/**/*.scss'],
    tasks: ['compass']
  },
  scripts: {
    files: ['js/**/*.js'],
    tasks: ['uglify']
  }
}

 });

Load the plugins
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-contrib-watch');

 Default task(s).
 grunt.registerTask('default', ['newer:compass', 'newer:uglify:all']);


};

These are the error messages I'm getting:

Local Npm module "grunt-contrib-compass" not found. Is it installed?

Local Npm module "grunt-contrib-uglify" not found. Is it installed?

Local Npm module "grunt-newer" not found. Is it installed?

Local Npm module "grunt-contrib-watch" not found. Is it installed?

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

Upvotes: 0

Views: 650

Answers (1)

AlannaRose
AlannaRose

Reputation: 123

The installation command, like:

npm install --save-dev grunt-contrib-uglify

needs to be run each of the npm modules

Upvotes: 1

Related Questions