Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Chris Bell
Chris Bell
9,125 Points

Grunt Help

I've trying to set up Grunt with the Grunt workshop and i'm just getting this error: Warning: Task "default" not found and undefined is not a function which normally means a js error.

Here is my gruntfile.js.

module.exports = function(grunt) {

    //Config Tasks
    grunt.initconfig({
        pkg: grunt.file.readJSON('package.json'),
        uglify: {
            build: {
                src: 'src/js/*.js',
                dest: 'js/site.js'
            }
        }
    });

    //Load the plugins
    grunt.loadNpmTasks('grunt-contrib-uglify');

    //Register Tasks
    grunt.registerTask('default', ['uglify:build']);
};

If you are posting code be sure to checkout the Markdown Cheatsheet. You can find it just above the post comment/answer button and it will tell you have to share code so that it is properly formatted. ♥

2 Answers

Zoltán Holik
Zoltán Holik
3,401 Points

Capital "C" is the answer. :)

grunt.initConfig({
Chris Bell
Chris Bell
9,125 Points

Got it!!

Thanks I guessed it would be a typo as has to handtype from the video