I had this error after upgrading my IDE:

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

Solution

Run in your command line:

 npm install -g @angular/cli

 

 

Saved you some valuable time?

Buy me a drink 🍺