107

I wonder how to check the version of ionic. If I do ionic -v I get back 1.4.3

Can that be? Wasn't 1.0.0 just released?

brainray
  • 12,512
  • 11
  • 67
  • 116

16 Answers16

234

Run from your project folder:

$ ionic info

Cordova CLI: 5.0.0
Ionic Version: 1.0.1
Ionic CLI Version: 1.6.1
Ionic App Lib Version: 0.3.3
OS: Windows 7 SP1
Node Version: v0.12.2

If your CLI is old enough, it will say "info is not a valid task" and you can use this:

$ ionic lib

Local Ionic version: 1.0.1  (C:\stuff\july21app\www\lib\ionic\version.json)
Latest Ionic version: 1.0.1  (released 2015-06-30)
* Local version up to date
Gianfranco P.
  • 10,049
  • 6
  • 51
  • 68
scw
  • 5,450
  • 8
  • 36
  • 49
  • 2
    This answer should be the accepted answer. This is the only one that worked for me. `ionic -v` returned the globally installed `ionic-cli` version. `Ionic.version` or `ionic.version` in the browser does not exist in my installation. – Wesley Gonçalves Jun 05 '20 at 00:53
96

That is the version number of the Ionic CLI, which is different from the version number of Ionic's library. Here are a couple easy ways to check the version.

In the browser console, you can run ionic.version and it will print to the console what version it is.

Screenshot of Chrome Dev Tools console

You can also look at the bower.json file in your app, and it will show the version number like you see here. https://github.com/ionic-in-action/chapter5/blob/master/bower.json#L5

Jeremy Wilken
  • 6,965
  • 22
  • 21
30

In the terminal following command returns the version:

'ionic version' or 'ionic -v'

returned

'3.2.0'

The above is the CLI version. Go to the project folder and use the code below like scw's answer.

$ cd ionic-project
$ ionic info
✔ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.2.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic 5.2.7, cordova-plugin-ionic-webview 2.2.5, (and 15 other plugins)

System:

   NodeJS : v8.12.0 (/usr/local/bin/node)
   npm    : 6.4.1
   OS     : OS X Yosemite
Black Mamba
  • 13,632
  • 6
  • 82
  • 105
12
$ ionic -v

CLI 4.12.0

you will be able to know your framework version

$ ionic info

all details

Anjali Sharma
  • 535
  • 6
  • 15
7

At some point in time the object changed from ionic to an uppercase Ionic.

As of July 2017 you need to put Ionic.version into your console to get the version number.

Daniel
  • 3,541
  • 3
  • 33
  • 46
7

Ionic projects structure are similar as Angular projects, you can get use

ionic info

command to Print project, system, and environment information.

enter image description here

This command is an easy way to share information about your setup. If applicable, be sure to run ionic info within your project directory to display even more information.

We may use --json after ionic info to print system/environment info in JSON format

ionic info --json
Chintan Panchal
  • 721
  • 6
  • 11
6

on your terminal run this command on your ionic project folder ionic info and you will get the following :

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0 ios 4.5.5
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node  : v8.9.3
    npm   : 6.1.0
    OS    : macOS
    Xcode : Xcode 10.1 Build version 10B61

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro
Huthaifah Kholi
  • 101
  • 1
  • 2
  • 10
6

You can find the library version accessing the file package.json. Under dependencies, check the property ionic-angular. You can also check the Ionic CLI version typing ionic info in the terminal from your project's folder.

Rodrigo Silva
  • 377
  • 3
  • 14
5

Running ionic info on your project directory give all the info you need the npm version, cli, app script and some more

Ahmed Adewale
  • 2,943
  • 23
  • 19
4

for slower machines use the browser console.

Ionic.version

It doesn't do much analysis like the terminal's

ionic info

which gathers other useful information about your ionic project.

prosper1
  • 304
  • 2
  • 9
3

The method version on ionic object returns the current version in string format.

InfinitePrime
  • 1,718
  • 15
  • 18
3

$ ionic info Ionic:

Ionic CLI : 5.4.16

Utility:

cordova-res : not installed native-run : 0.3.0

System:

NodeJS : v12.16.1 npm : 6.13.4 OS : Linux 5.3

────────────────────────────────────────────────────────────

       Ionic CLI update available: 5.4.16 → 6.2.2

 The package name has changed from ionic to @ionic/cli!

         To update, run: npm uninstall -g ionic
             Then run: npm i -g @ionic/cli

────────────────────────────────────────────────────────────

2

ionic info

This will give you the ionic version,node, npm and os.

If you need only ionic version use ionic -v.

If your project's development ionic version and your global versions are different then check them by using the below commands.

To check the globally installed ionic version ionic -g and to check the project's ionic version use ionic -g.

To check the project's ionic version use ionic -v in your project path or else ionic info to get the details of ionic and its dependencies.

Pradeepa
  • 107
  • 4
  • ionic -v displays the Ionic CLI version, not the framework version. ionic info is ok since it displays both CLI and framework versions. – Luis Martin Jan 02 '21 at 18:18
2

ionic -v

Ionic CLI update available: 5.2.4 → 5.2.5
Run npm i -g ionic to update

Vega
  • 27,856
  • 27
  • 95
  • 103
  • 2
    The OP specifically said they ran this exact command and it seemed to give the wrong results. It gives the version of Ionic CLI. They asked "How to get the version of ionic framework?"... – underscore_d Jul 02 '20 at 09:51
1

You can use command ionic info to get details of ionic CLI , angular CLI , Node JS version and NPM version

Deep Adhia
  • 382
  • 4
  • 11
1

Run command ionic info

in project root folder and you will get complete information of versions

Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 5.3.2 @angular-devkit/build-angular : 0.1000.8 @angular-devkit/schematics : 10.0.8 @angular/cli : 10.0.8 @ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : none Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

cordova-res : not installed native-run (update available: 1.4.1) : 1.3.0

System:

Android SDK Tools : 26.1.1 (/home/rasharma/Android/Sdk/) NodeJS : v12.14.1 (/home/rasharma/.nvm/versions/node/v12.14.1/bin/node) npm : 6.13.4 OS : Linux 5.11