FIX for 'ng is not recognized' Error - Angular CLI Installed But Still Not Working
ฝัง
- เผยแพร่เมื่อ 21 ต.ค. 2024
- I had Angular installed globally but kept seeing errors when trying to use ng command but this fixed it.
Simply, add the relevant directory path to your ng.cmd file as a new Environment Variable in Path on Windows
Command I Used was Windows key + R then type %APPDATA%
You can see the Stack Overflow post here: stackoverflow....
I am installing Angular CLI with the following:
npm install -g -f @angular/cli
(check that this is still current when you are trying to do this as it may change!)
Testing with
ng v
Remember - it's never too late!
Cheers,
Steve
you are awesome!!! I went through so many things trying to figure this out with other videos and nothing was working but this worked so thanks
Glad I could help!
Thanks so much, was having trouble with the install and this fixed it, awesome stuff
glad to hear it worked, it was so frustrating for me!
Hey, Thank you for saving my day!
Happy to help!
To resolve the 'ng is not recognized' error when using Angular CLI, ensure that Angular CLI is installed and added to the PATH environment variable correctly. You can do this by running npm install -g @angular/cli and then setting the PATH to the location where ng.cmd file is located. Additionally, make sure to add the ng path to the Windows advanced settings.
that looks like a fair summary, yes
finally.. thank you soo much
happy to help
finally a good one, thanks
You're welcome!
its working thanks
The restart is crucial
It worked !Thank You!!!!!!
Glad it helped
how if find npm file i don't have npm file pls help Windowd 11
do you definitely have npm installed? best to work through that scenario first as it sounds like it might not be there in the first instance
But my ng.cmd file is missing, any help?
did you do a search for it in other directories? did you get it fixed?
not a hidden file in Windows is it?
thanks mate.
You're most welcome
i still have the same problem even i restart my machine
just seeing this now, sorry - did you get it fixed?
Thanks
Welcome
thank u
You're welcome!
great
glad it helped