Reputation: 17402
I am running in a issue last two days. When I open Vs code and Cmd as admin then only able to run ng
commands.
ng -v
, where ng
- Workingng build
, ng serve
- Workingng -v
, where ng
- Not workingng build
, ng serve
- Not workingGetting error
'ng' is not recognized as an internal or external command,
operable program or batch file.
To get admin credentials everytime I need to raise a ticket. Always I dont have admin credentials.
How can I fix this issue?
I have below configuration
Node.js: C:\Program Files\nodejs
npm: C:\Users\Username\AppData\Roaming\npm
Angular CLI: 9.1.9
Node: 12.15.0
Environment variable in Path
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
C:\Users\Username\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\Username\AppData\Roaming\npm
C:\Program Files\nodejs
C:\Users\Username\node_modules\.bin
Upvotes: 0
Views: 1921
Reputation: 17402
Fixed by uninstalling and reinstalling node.js
(from programs and features
) .
Upvotes: 3