Angular CLI - ng version Command



The ng version command is used to display the current version of the Angular CLI, along with other important Angular-related information. The details that are displayed by the ng version command are given below −

  • Version of the Angular CLI you are using.
  • Version of the Node and its package manager, i.e. npm.
  • Version of the operating system and its architecture.
  • Version of the angular-devkit packages.

Syntax

The syntax of ng version command is as follows −

ng version [options]
Or,
ng v [options]

Options

Options are optional parameters of ng version command, which are:

Sr.No. Option & Syntax Description
1 --help=true|false|json|JSON When you use this option it will show a help message for this command in the console. It is of boolean type and its default value is "false".

Example

Sometimes, certain packages or libraries might require specific versions of Angular. So, you need to ensure that your development environment matches the project's setup. You can verify it by using the ng version command as shown below −

ng version

After running this command, you may see the following response in CLI −

CLI
Advertisements