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

-bash: gulp: command not found

I tried logging out my hello task but when i do, i get -bash: gulp: command not found i have installed gulp globally as well as locally, I have node and npm, then i thought i was missing homebrew, which i installed but still.

"use strict";

var gulp = require('gulp');

gulp.task("hello", function(){
    console.log("this works!");
})

3 Answers

It was probably not properly installed. Did you get any errors from installing Gulp?

Desireé Bryant
Desireé Bryant
56,114 Points

I had the same problem. I found the answer at this link gulp: command not found.

You have to change the directory gulp installed to this: $ npm config set prefix /usr/local

Do this in the terminal at the root level. Let us know if this doesn't work.

Steven Khoshaba
Steven Khoshaba
8,197 Points

Worked for me, thank you!

i also encountered by this problem...Can anyone please help me out