sh.exe": http-server: command not found

After I ran following command

npm install

it was successfully executed But when i tried to execute following command

http-server

It gave following error

sh.exe": http-server: command not found

Can somebody help me out to solve the above error

You have installed the http-server package locally, rather than globally.

Check the node_modules/.bin/ folder, find the executable and execute that.

If that works try $(npm bin)/http-server if you are running from git bash. If you use the windows command prompt try node_modules\.bin\http-server.cmd from the same folder where you ran npm install