-1

Hi i installed node and npm. Next i want to configure global server called "http-server". Everything install fine. But when i want to run "http-server" i get error.

C:\WINDOWS\system32>http-server 'http-server' is not recognized as an
internal or external command, operable program or batch file.

This my CODE in CMD

C:\Users\Matthew>cd C:\

C:\>npm install --global http-server
C:\Users\Matthew\npm-global\http-server -> C:\Users\Matthew\npm-global\node_modules\http-server\bin\http-server

C:\Users\Matthew\npm-global\hs -> C:\Users\Matthew\npm-global\node_modules\http-server\bin\http-server

+ http-server@0.10.0
added 23 packages in 36.321s

PHOTO CMD

My PATHS are good: C:\Users\Matthew>PATH PATH=C:\Program Files\nodejs\;C:\Users\Matthew\AppData\Roaming\npm

Why this command create folder npm-global? Why its not installed in AppData~

Please help! :)

matebe95
  • 1
  • 1
  • 3
  • Possible duplicate of [Grunt on Windows 8: 'grunt' is not recognized](https://stackoverflow.com/questions/19135561/grunt-on-windows-8-grunt-is-not-recognized) – Kevin B Nov 28 '17 at 17:21

1 Answers1

0

Here is a answer:

npm config set prefix C:\Users\yourname\AppData\Roaming\npm
matebe95
  • 1
  • 1
  • 3