Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking version of angular-cli that's installed?

Is there a way to check the specific version of angular-cli that's installed globally on my machine? I'm in a Windows environment. *npm -v* and *node -v* only gives me the version of npm and node respectively, and I can't seem to find any commands with ng.

I'm trying to run a project that I'm working on, and it ran on an older version of angular-cli using npm. However, after installing other demo projects, my main project doesn't work anymore without uninstalling and reinstalling angular-cli at the specific version.

like image 235
bunndan Avatar asked Dec 07 '16 20:12

bunndan


People also ask

What is the current Angular CLI version?

The Angular latest Official stable version is Angular v13. 2.5, which is released on 2nd March 2022.

Where is my Angular CLI installed?

notice -g parameter it will install cli globally and you can you it in any new project from now on. CLI is installed in NPM.

Is Angular version and Angular CLI version same?

Note: After angular 6 the Angular-CLI version is the same as the Angular version. Now, if you want to find which Angular-CLI version to use for which version of Angular you can find that here AngularCLI Package.


12 Answers

angular cli can report its version when you run it with the version flag

ng --version
like image 172
Meir Avatar answered Oct 04 '22 01:10

Meir


Execute:

ng v

or

ng --version

tell you the current angular cli version number

enter image description here

like image 30
Legends Avatar answered Oct 04 '22 02:10

Legends


ng --version or short ng v kinda correct answers, but there are some important details:

If you running ng v inside your angular cli project folder it will show your local cli version installed in your project (package.json)

If you running ng v outside your angular cli project folder it will always show the global cli version

like image 29
angularrocks.com Avatar answered Oct 04 '22 01:10

angularrocks.com


You can use npm list -global to list all the component versions currently installed on your system.
For viewing specific lists at different levels use --depth.

e.g:

npm list -global --depth 0
like image 25
Himanshu Avatar answered Oct 04 '22 01:10

Himanshu


Go to your folder path in cmd where your angular is installed and type ng --version it will show your angular version. Thanks.

like image 21
Y. Joy Ch. Singha Avatar answered Oct 04 '22 03:10

Y. Joy Ch. Singha


DON'T USE ng --version because it provides a global system installed angular version.

Go to the package.json file, check the "@angular/core" version. It is an actual project version.

enter image description here

like image 32
Sathia Avatar answered Oct 04 '22 02:10

Sathia


Simply just enter any of below in the command line,

ng --version OR ng v OR ng -v

The Output would be like,

Screenshot

Not only the Angular version but also the Node version is also mentioned there. I use Angular 6.

like image 38
Pramod Dissanayake Avatar answered Oct 04 '22 01:10

Pramod Dissanayake


In Command line we can check our installed ng version.

ng -v OR ng --version OR ng version

This will give you like this :

 _                      _                 ____ _     ___

   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.5
Node: 8.0.0
OS: linux x64
Angular: 
...
like image 43
Vik2696 Avatar answered Oct 04 '22 01:10

Vik2696


Simply run the following command :

ng v

like image 35
Mwiza Avatar answered Oct 04 '22 01:10

Mwiza


ng version or ng --version or ng v OR ng -v

You can use this 4 commands to check the which version of angular-cli installed in your machine.

like image 23
Parth Raval Avatar answered Oct 04 '22 02:10

Parth Raval


Simple run the following commands:

ng --version 

OR

 ng -v

Output on terminal:

      / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
            |___/


Angular CLI: 6.0.8
Node: 10.15.0
OS: linux x64 
like image 35
Salman Ahmed Avatar answered Oct 04 '22 03:10

Salman Ahmed


You can find using CLI ng --version

As I am using

angular-cli: 1.0.0-beta.28.3

node: 6.10.1

os: darwin x64

enter image description here

like image 38
Nitin . Avatar answered Oct 04 '22 03:10

Nitin .