Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Gulp Basics Welcome to Gulp.js Installing Gulp

Dehn Hunsworth
Dehn Hunsworth
7,189 Points

bash: http-server: command not found

I see many similar issues from other students, I tried to read through some responses and attempt fixes on my machine. However i am unable to get http-server to run from command line.

I ran

$ which npm
/c/Program Files/nodejs/npm
$ which node
/c/Program Files/nodejs/node

then installed http-server globally as shown but bash cannot seem to see it. I am assuming there is a bad or nonexistent path in here but not too familiar with settings there. Help Please, really want to keep moving on through this track.

Also, just noticed the commits to this repo are 4 years old. Would that have any effect of bad versions clashing?

Thanks! Dehn

Dehn Hunsworth
Dehn Hunsworth
7,189 Points

Yeah install looked good, not an expert on this area, but I believe it was something to do with the PATH. i uninstalled and reinstalled Node.js and all good now..

1 Answer

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,703 Points

Is it possible when you tried to install http-server globally there was an error and it didn't install correctly? Try again and look at the output carefully.