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.
http-server not working for me either
I started with... $ npm install http-server -g
first attempt to get it to work... $ http-server my_project
second attempt ... $ http-server C:\Users\leemsy\Desktop\my_project
third attempt ... $ http-server "C:\Users\leemsy\Desktop\my_project"
fourth attempt ... $ http-server C:\Users\leemsy\Desktop\my_project\index.html
"Try downgrading the http-server version as the latest version (0.10.0 and 0.11.0) is causing issue due to ecstatic (3.3.2). Try uninstalling the current http-server version and then try to install 0.9.0 or older version." $ npm uninstall -g http-server $ npm install email@example.com
Also, make sure you install the server in the directory the website will be run out of. ;)
Here is what I did.
1.) I created a new directory (in my Desktop directory) called "my_project" that contains an index.html file.
2.) I located to the "my_project" directory in windows powershell and typed
npm install firstname.lastname@example.org
3.) I typed in node and the entire path to the http-server file.
Type http://184.108.40.206:8080/index.html into your browser and the page should come up. Be sure to refresh the page.