"http-server" is not recognized as an internal or external command

After installing the angular -seed project, I followed these steps:

Storage Cloning:

git clone https://github.com/angular/angular-seed.git

cd angular -seed

Then I ran npm install

at the end of the installation, I get:

angular -seed@0.0.0 prestart C: \ Users \ user \ Documents \ GitHub \ comilion \ angular -seed npm install

angular -seed@0.0.0 postinstall C: \ Users \ user \ Documents \ GitHub \ myproject \ angular -seed bower install

angular -seed@0.0.0 start C: \ Users \ user \ Documents \ GitHub \ myproject \ angular -seed http-server -a localhost -p 2324

'http-server' is not recognized as an internal or external command, operating program, or batch file.

npm ERR! angular -seed@0.0.0 start: http-server -a localhost -p 2324 npm ERR! Output Status 1 npm ERR! npm ERR! Failed to execute angular -seed@0.0.0 start script. npm ERR! This is most likely a problem with the angular -seed, npm ERR package! not with the hour itself. npm ERR! Tell the author that this does not work on your system: npm ERR!
http-server -a localhost -p 2324 npm ERR! You can get information via: npm ERR! npm owner ls angular -seed npm ERR! Probably an additional exit for registration is higher. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C: \ Program Files \ nodejs \\ node.exe" "C: \ Program Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js" "start" npm ERR! cwd C: \ Users \ user \ Documents \ GitHub \ myproject \ angular -seed npm ERR! node -v v0.10.22 npm ERR! npm -v 1.3.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional registration information can be found at: npm ERR!
C: \ Users \ user \ Documents \ GitHub \ MyProject \ angular -seed \ NPM-debug.log

Please let me know if you have any suggestions for resolving this issue.

+8
angularjs npm angular-seed
source share
4 answers

@BenFortune found an answer that was

http server must be installed globally using npm install -g http-server

+26
source

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

+7
source
 npm install -g http-server 

Use this command to install it and install globally.

-one
source
 npm install -g http-server 

Use this command to install the http-server module in your project. You can check this in package.json

-one
source

All Articles