I am facing the issue ,
Error: You need to specify a command before moving on. Use '--help' to view the available commands
everytime while using any of the ng command
I actually upgraded ng version just a day ago. I faced same problem. This happened because the current version in your system got depreciated ( no longer in use). So you have to update ng version in your system.
npm uninstall -g @angular/cli
npm install -g @angular/cli
this will help to update your angular version in your system and to check, you have to give ng version instead ng --version.
I hope this is helpful.
Usually, the default terminal is Command Prompt.
Change that to Power Shell and try it again. For some reason, Command Prompt can not execute Angular CLI commands, at least in my end.
In you are using VS Code, you can check here how to change default terminal.
I had the same problem and the uninstall/install angular cli didn't solve it.
What worked for me : There was a path to C:\Users*username*\AppData\Roaming\npm\ and another one to C:\Users*username*\AppData\Roaming\npm\node_modules@angular\cli
I removed the second path and restarted my CMD console
It worked again.
Uninstalling and Installing @angular/cli did not work for me this answer fixed it
make sure you have proper path variable configured as shown below Go to your system variable settings path variable snapshot make sure you have all these mentioned as part of path C:\Users\AppData\Roaming\npm\node_modules@angular\cli C:\Users\AppData\Roaming\npm C:\Program Files\nodejs
https://stackoverflow.com/a/71602204/6314006
Make sure to edit the path under System variables.
Angular 17:
Try to install latest version, this is recommended approach
npm install -g @angular/cli
Ensure the Angular CLI is installed globally
ng --version
You can use following command to see a list of available commands
ng help
Note: Please also make sure that you have installed compatible version of Node.
I hope this would be helpful to resolve the issue.
ng --versionwith angular cli 14, you will get that error. Please useng versioninstead.