If the decision does not work for you. Try the following. This solved the problem on my system.
Make sure that both npm and http-server locations are added to the "PATH" environment variable (both user and system variables).
If he is not there,
add C:\Users\username\AppData\Roaming\npm and C:\Users\username\AppData\Roaming\npm\node_modules\http-server to the 'PATH' environment variable
Nithin baby
source share