by @kodeazy
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 belowerror
C:\Users\XXXX>ng --version
'ng' is not recognized as an internal or external command,
operable program or batch file.
- Execute the below command in command prompt we will be getting the
path
npm config get prefix
- The path I got is
C:\Users\XXXX\AppData\Roaming\npm
- Go to Environment variables and Add the above
path
in PATHvariable
as shown below and save it.
- restart the command prompt and check the angular version again by using
ng --version
command