Which files are in the directory you ran http-server in? What URL did you type in your browser?
Bumping this because I am suddenly having the same issue. I can't load any of my includes from a relative path. I'm getting 404 errors in the console, but only when running in http-server, not off the file system.
e.g. ../bower_components/angular/angular.min.js
All my production dependencies are up one dir from my index.html (I don't want 3rd party code in my app directory).
The Chrome console is showing all include requests as being located in a child directory, but only when running in http-server: localhost:8080/bower_components/etc.
http-server doesn't allow and, by the HTTP specs, cannot deliver files outside the web root. You should either let http-server serve the directory above or symlink it into the web root using ln -s.
@derhuerst Thanks much, makes perfect sense.
Would you mind closing the issue to reduce cognitive load for the maintainer? Thanks!
closes #315
Didn't see that @weirdoCHAO opened the issue. @weirdoCHAO please close this.
House cleaning.
Most helpful comment
http-serverdoesn't allow and, by the HTTP specs, cannot deliver files outside the web root. You should either lethttp-serverserve the directory above or symlink it into the web root usingln -s.