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

JavaScript Gulp Basics Welcome to Gulp.js Your First Gulp Task

Diego Palma
Diego Palma
12,653 Points

I'm getting an error when running gulp hello command

'use strict';

var gulp = require('gulp');

gulp.task("Hello", function() {
    console.log("Hello!");
});

$ gulp hello

[08:27:23] Using gulpfile ~/Downloads/Stage1Video3/gulpfile.js

[08:27:23] Task 'hello' is not in your gulpfile

[08:27:23] Please check the documentation for proper gulpfile formatting

1 Answer

jobbol
seal-mask
.a{fill-rule:evenodd;}techdegree
jobbol
Full Stack JavaScript Techdegree Student 17,885 Points

It appears Gulp tasks are case sensitive. This is news to me as well.

> gulp Hello  
[15:43:49] Using gulpfile ~\Documents\Projects\hello\gulpfile.js  
[15:43:49] Starting 'Hello'...  
Hello!  
[15:43:49] Finished 'Hello' after 171 Ξs  


> gulp hello  
[15:43:54] Using gulpfile ~\Documents\Projects\hello\gulpfile.js  
[15:43:54] Task 'hello' is not in your gulpfile  
[15:43:54] Please check the documentation for proper gulpfile formatting  

When you declare a gulp task, you should probably use lowercase from now on. Change "Hello" to "hello".

    gulp.task("Hello", function() {

Becomes

    gulp.task("hello", function() {