Scott Wilkinson
Scott Wilkinson

Reputation: 71

Warning: task "JSHint" not found

I am new to programming and have been working through Steven Foote's book "Learning to Program." I am on chapter 4 and have installed Node, npm, and grunt (I think).

I am at the point where I should be running JSHint to test that everything has been installed correctly but I am getting the following error: command line error

Here you can see my files:

Gruntfile.js

module.exports = function(grunt) {
    // Project Configuration
    grunt.initConfig({
        concat: {
            release: {
                src: ['js/values.js', 'js/prompt.js'],
                dest: 'release/main.js'
            }
        },
        copy: {
            release: {
                src: 'manifest.json',
                dest: 'release/manifest.json'
            }
        },
        jshint: {
            files: ['js/values.js', 'js/prompt.js']
        }
    })

    // Load Grunt Pluggins
    grunt.loadNpmTasks['grunt-contrib-concat'];
    grunt.loadNpmTasks['grunt-contrib-copy'];
    grunt.loadNpmTasks['grunt-contrib-jshint'];

    // Register Tasks
    grunt.registerTask('default', ['jshint', 'concat', 'copy']);

};

package.json

{
    "name": "KittenBook",
    "version": "0.0.1",
    "devDependencies": {
        "grunt": "~0.4.2",
        "grunt-contrib-concat": "~0.3.0",
        "grunt-contrib-jshint": "~0.6.3",
        "grunt-contrib-copy": "~0.5.0"
    }
}

As I said, I am still new to programming, so I don't know what else I need to provide, however I have seen another post similar to what I am wanting to know, but the answers didn't help me. Here is a link to this post: Grunt/JSHint installation error

Upvotes: 0

Views: 5620

Answers (1)

Scott Wilkinson
Scott Wilkinson

Reputation: 71

I found a solution after all. I followed the instructions at http://www.codereadability.com/jshint-with-grunt/

I also found the preferences tab and now I know how to copy/past from the cmd line, woohoo.

Upvotes: 0

Related Questions