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.
Michael Kalmykov8,918 Points
-bash: http-server: command not found
I can't get past the HTTP step. Details below
MKALMYKOV-MAC:starter gulp michael.kalmykov$ http-server -bash: http-server: command not found
NPM init works fine when i do npm start i get : npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.2.2 npm ERR! npm v3.9.5
npm ERR! missing script: start npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request: npm ERR! /Users/michael.kalmykov/Desktop/starter gulp/npm-debug.log
been trying to fix this for 2 hours now. Please help
Yeah, I actually started diving a bit deeper for you and watched some of the video in question. It's not done very well. Most videos on treehouse are done pretty extensively, unfortunately this one isn't and should be addressed.
It seems you've figured it out. I tried to install http-server locally quickly and couldn't get it working first try, but it seems you've found the same command that I found to work for this instance, which is to install it globally with npm like so
npm install http-server -g.
You can also find more information on http-server here if you haven't already: https://github.com/indexzero/http-server
Now that I looked on the GitHub repo their using it shows you that you need to install gulp and http-server globally (https://github.com/hdngr/treehouse-gulp-basics). They should really just include this in the video. Or be more clear that there's further instructions to follow on the git page. This might help someone else in the future.
Anyways, good luck the rest of the way :)
I'm not the best person to ask about this, but I thought I would try to help a bit:
Have you tried removing your modules folder and tried running
npm init and
npm start again?
Michael Kalmykov & Kristofer Doman:
You must install Node.js & then npm (Node Package Manager) first before you attempt to make your own computer your local http-server. Otherwise, you're putting the cart before the horse. Be sure to follow the installation instructions exactly for your operating system (Apple MacIntosh OS X, Windows, or Linux). They should load without any problem.
Thanks Michael. I had my question answered immediately because of you.