How to Check Angular CLI Version

There are three ways in which you can check Angular CLI Version

  1. Use the command ng --version (or ng -v) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to find out the globally installed version of Angular.
  2. Use the npm list --depth 0 to find out the list of packages installed in the current folder. Add the -g (global) flag (npm list -g --depth 0), to find the global version.
  3. You can also open the package.json and look for the version of @angular/cli package

Using ng –version

Where you run ng --version (or ng v ) is important.

If you run it inside a Angular project folder, then it will list the locally installed Angular CLI Version

Run it outside the Angular folder to find out the globally installed Angular Version.

Output

Local Version

Here we run the ng v in a Angular 8 project folder

Output

Using npm list

npm command npm list gives list of packages installed in the current folder.

The global flag -g (or --global) lists all packages installed globally

We need also include the flag --depth 0, which list only the top level packages. Use --depth 1, --depth 2, etc. to dig deeper to find out the version of dependencies.

Local version

This will give you packages installed in the current folder. We run it on a Angular 8 project folder.

output

Using package.json

Open the package.json file and look for the  @angular/cli under the devDependencies node.

Here is a typical package.json file

References

ng-version

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top