I'm trying to run a basic http-server to test out some html files and I keep running into the same error.
I did
sudo npm install -g http-server
a bunch of times, but each time I try
simple git:(master) http-server
I keep getting this error:
zsh: command not found: http-server
I've tried other variations such as http-server / 8000, I've tried using different command syntax but nothing seems to be working.
my npm version is 5.5.1, my node version is 8.3.0, and my OS is Mac OSX Sierra v10.12.6
Please let me know if you can help or if you see anything I'm doing wrong that I'm just not noticing.
edit: tiny update I was able to get a server going with python but I'd really like to know why this wasn't working.
edit 2: problem solved thanks!
npm install http-server -g.
please install http-server globally and there after u can run the command
http-server -o
If you are here because you want to test your Angular PWA project locally you need to install http-server package globally using npm install --global http-server
and then only you can run http-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With