Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After installing Angular in windows - ng is not recognized as an internal or external command

I try to install Angular but after installing i got this error

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

I installed node,npm and git I gived below comment for installing Angular.I installed after installing i give ng-v comment i found this error.

npm install -g @angular/cli

like image 552
Raghul Rajendran Avatar asked Nov 03 '17 11:11

Raghul Rajendran


People also ask

Why is NG command not working?

To solve the error "ng: command not found", install the angular cli package globally by running npm install -g @angular/cli@latest and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.

How do you check if angular cli is installed in Windows?

To Check Angular CLI version use ng --version or ng v or npm list -global --depth 0 commands. ng --version command returns the details of version of Angular CLI installed and in addition to that version of Angular development packages like @angular-devkit/architect,rxjs etc.. as shown below.

How do you confirm angular cli is installed?

Use the command ng --version (or ng -v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to find out the globally installed version of Angular. Use the npm list --depth 0 to find out the list of packages installed in the current folder.


2 Answers

Add your node js path ex: " C:\Users\DELL\AppData\Roaming\npm" to System Variable source :follow this link

like image 160
Sathish Kotha Avatar answered Oct 04 '22 03:10

Sathish Kotha


Execute below command:-

npm uninstall -g angular-cli

npm uninstall --save-dev angular-cli

npm cache clean

npm install -g @angular/cli@latest

Try out it for me it worked

like image 45
Nausheen Khan Avatar answered Oct 04 '22 03:10

Nausheen Khan