Comment
Author: Admin | 2025-04-28
Asked 10 years, 8 months ago Viewed 72k times After installing angular-seed project, i did the following steps:Cloned the repository : git clone https://github.com/angular/angular-seed.git cd angular-seedThen I ran npm installat the end of the install i get: [email protected] prestart C:\Users\user\Documents\GitHub\comilion\angular-seed npm install [email protected] postinstall C:\Users\user\Documents\GitHub\myproject\angular-seed bower install [email protected] 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, operable program or batch file. npm ERR! [email protected] start: http-server -a localhost -p 2324 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is most likely a problem with the angular-seed package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! http-server -a localhost -p 2324 npm ERR! You can get their info via: npm ERR! npm owner ls angular-seed npm ERR! There is likely additional logging output above. 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 logging details can be found in: npm ERR! C:\Users\user\Documents\GitHub\myproject\angular-seed\npm-debug.logplease let me know if you have any suggestions how to solve this issue. asked Jun 16, 2014 at 13:44 Liad LivnatLiad Livnat7,47517 gold badges61 silver badges98 bronze badges 2 @BenFortune found the answer it washttp-server needs to be installed globally with npm install -g http-server Mörre5,7236 gold badges40 silver badges66 bronze badges answered Jun 17, 2014 at 7:25 Liad LivnatLiad Livnat7,47517 gold badges61 silver badges98 bronze badges 1 If the accepted solution did not work for you. Try the following. This solved the issue in my system.Make sure the locations of both npm and http-server are added in environment variable 'PATH' (Both user variable and System variable).If it is not present, add C:\Users\username\AppData\Roaming\npm and C:\Users\username\AppData\Roaming\npm\node_modules\http-server to environment variable 'PATH' answered Apr 25, 2016 at 7:34 2 If you are using Window 10. Then after runnpm install -g http-serverThe http-server.cmd will available in C:\Users\your-user\AppData\Roaming\npm Then check if `http-server` work in `cmd` or not. If it works, you don't need to see the below part.If it not work. You need to check Environment VariableIf you add variable to Path (inside admin). You need to run cmd as Administrator.If you add variable to Path (inside System variable). You don't need
Add Comment