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

后端 未结 6 614
鱼传尺愫
鱼传尺愫 2021-02-05 11:12

After installing angular-seed project, i did the following steps:

Cloned the repository :

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

6条回答
  •  清酒与你
    2021-02-05 12:07

    If you are using Window 10. Then after run

    npm install -g http-server
    

    The 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 Variable
    • If 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 to run cmd as Administrator.
    • Add C:\Users\your-user\AppData\Roaming\npm -> OK -> OK -> Re-open the cmd.
    • The http-server will work

提交回复
热议问题