fedmich
fedmich

Reputation: 5371

How to install specific version of ionic via npm

What command do I need to run to install specific version via npm?

If I run the code npm install -g cordova it installs the latest version. Since I'm using multiple laptops and computers I need them to have same versions when I switch back and forth to them.

This is the version of IONIC I am using and preferred: I'd like to avoid and update them all as I may encounter bugs if I use the latest version.

Ionic CLI is out of date:
Locally installed version: 1.3.20
* Latest version: 1.4.3
* https://github.com/driftyco/ionic-cli/blob/master/CHANGELOG.md
* Run npm install -g ionic to update

btw, I found these releases via github https://github.com/driftyco/ionic-cli/releases

Thanks in advance for the help!

Upvotes: 39

Views: 108305

Answers (4)

Aki Nishanov
Aki Nishanov

Reputation: 1157

Syntax

To install a specific version through npm, the following syntax should be followed:

npm install -g ionic@VERSION
  • Where VERSION is the number of the version we want to install from Ionic

Example

Let's say that we want to install IONIC 1.4.0, because you should specify:

npm install -g [email protected]

Notes

To see all available versions use: npm info ionic.

Upvotes: 87

Pradeepa
Pradeepa

Reputation: 117

For example you want install 3.2.0 of ionic version then you need to install it by using below command.

npm install [email protected] --save

If you want to install the latest version of ionic ,but already if you have the old one then use

npm install ionic@latest --save

Upvotes: 2

Marcelo Agimóvel
Marcelo Agimóvel

Reputation: 1719

Linux:

sudo npm install -g  [email protected]

Mac

npm install -g  [email protected]

Replace 2.2.0 for the version you want

Upvotes: 6

Piotr Fryga
Piotr Fryga

Reputation: 556

In addition you can update your package.json file

e.g.

"dependencies": {
    "ionic": "^1.4.3"
}

Where 1.4.3 is ionic version.

Upvotes: 1

Related Questions