[node.js] 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.

This question is related to node.js angular npm angular-cli

The answer is


Simply run the following command :

ng v


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: 
...

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.


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


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

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


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.


Execute:

ng v

or

ng --version

tell you the current angular cli version number

enter image description here


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

enter image description here


ng --version

ng--version output

Please take a look at the above image.


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 

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


Examples related to node.js

Hide Signs that Meteor.js was Used Querying date field in MongoDB with Mongoose SyntaxError: Cannot use import statement outside a module Server Discovery And Monitoring engine is deprecated How to fix ReferenceError: primordials is not defined in node UnhandledPromiseRejectionWarning: This error originated either by throwing inside of an async function without a catch block dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac internal/modules/cjs/loader.js:582 throw err DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server Please run `npm cache clean`

Examples related to angular

error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class error TS1086: An accessor cannot be declared in an ambient context in Angular 9 TS1086: An accessor cannot be declared in ambient context @angular/material/index.d.ts' is not a module Why powershell does not run Angular commands? error: This is probably not a problem with npm. There is likely additional logging output above Angular @ViewChild() error: Expected 2 arguments, but got 1 Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class' Access blocked by CORS policy: Response to preflight request doesn't pass access control check origin 'http://localhost:4200' has been blocked by CORS policy in Angular7

Examples related to npm

What does 'x packages are looking for funding' mean when running `npm install`? error: This is probably not a problem with npm. There is likely additional logging output above Module not found: Error: Can't resolve 'core-js/es6' Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist` ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server Please run `npm cache clean` What exactly is the 'react-scripts start' command? On npm install: Unhandled rejection Error: EACCES: permission denied Difference between npx and npm?

Examples related to angular-cli

Why powershell does not run Angular commands? ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead Angular CLI Error: The serve command requires to be run in an Angular project, but a project definition could not be found Could not find module "@angular-devkit/build-angular" How to remove package using Angular CLI? How to set environment via `ng serve` in Angular 6 Error: Local workspace file ('angular.json') could not be found How do I deal with installing peer dependencies in Angular CLI? How to iterate using ngFor loop Map containing key as string and values as map iteration how to format date in Component of angular 5