ng is not recognized as an internal or external command using “npm run ng
How To Solve ng Is Not Recognized As An Internal Or External Command In Angular?
This “ng is not recognized as an internal or external command” error I found to be due to improper installation or configuration of Angular CLI in the local machine.
Solved Quick Way
- First search ng.cmd file on your System.
- usually at : E:\Users\
\AppData\Roaming\npm - Set PATH
- check CMD To “ng version” on New command window
- install angular with -g command “npm install -g @angular/cli”
npm run ng <command>
step 1: run in command on your cmd
npm install -g @angular/cli
After that
first of all ( open in Windows 10) Control Path Like Panel\All Control Panel Items\System or following with the picture
step 2 : Go to Advanced system settings
step 3: Set Environment Variables
step 4: check your Environment
step 5: add missing ng path
Here is set your new environment variable that you required add: C:\Users\PAKAINFO\AppData\Roaming\npm\node_modules\@angular\cli\bin
Step 6: Last step, restart all opened command prompts as well as try again.
Note: your Main nodejs version requireds to be 8.9 OR Big version.
USER faces Query Like
- ‘ng’ is not recognized as an internal or external command, operable program or batch file
- After installing Angular in windows – ng is not recognized as an internal or external command
- Angular’s – ‘ng’ is not recognized as an internal or external command, operable program or batch file
- ‘ng’ is not recognized as an internal or external command, on windows 64 bit system
I hope you get an idea about ng is not recognized as an internal or external command.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.