Fix: “ANGULAR – Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands”

If you are facing “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands” Error then you are not alone.

Lot of people facing the same error “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands.” Every time while using any one of the ng commands.

In this article we will explain how to fix “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands.”

Why “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands” Occured?

Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands’ is seen because of an outdated version of ng.

This error occured because current version is depreciated and no longer in use as of now.

How to fix “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands”?

To fix “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands” error, Uninstall the Angular older cli version and Install the latest version 14.0.0 using command ‘npm uninstall -g @angular/cli’ and ‘npm install -g @angular/cli’.

After Angular cli latest version 14.0.0 release, some older Angular cli versions have been depreciated officially.

So if you are still using the angular cli older version then there are high chances that you would be facing the Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands.

After Updating ng version, error will be fixed.

npm uninstall -g @angular/cli
npm install -g @angular/cli

Note: you have to use the command ‘ng version‘ instead ‘ng-- version‘ to check the installed angular cli version.

Conclusion

To fix “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands” error, Uninstall the Angular older cli version and Install the latest version 14.0.0 using command ‘npm uninstall -g @angular/cli’ and ‘npm install -g @angular/cli’.

I am hoping that You will be able to resolve “Error: You need to specify a command before moving on. Use ‘–help’ to view the available commands” by following above fix.