by @kodeazy

ng is not recognized as an internal or external command operable program or batch file

Home » Angular » ng is not recognized as an internal or external command operable program or batch file
  • Here I installed angular using npm install -g @angular/cli
  • when I try to execute ng --version command in command prompt getting below error

Image not found

  • Execute the below command in command prompt we will be getting the path

    npm config get prefix

    Image not found

  • The path I got is C:\Users\XXXX\AppData\Roaming\npm
  • Go to Environment variables and Add the above path in PATH variable as shown below and save it.

Image not found

  • restart the command prompt and check the angular version again by using ng --version command

Image not found