Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install specific version of ionic via npm

Tags:

node.js

ionic

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!

like image 549
fedmich Avatar asked May 19 '15 04:05

fedmich


People also ask

How do I use a specific version of npm?

Use npm list [package-name] to know the specific latest version of an installed package. Use npm install [package-name]@[version-number] to install an older version of a package. Prefix a version number with a caret (^) or a tilde (~) to specify to install the latest minor or patch version, respectively.


2 Answers

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.

like image 73
Aki Nishanov Avatar answered Sep 30 '22 18:09

Aki Nishanov


Linux:

sudo npm install -g  [email protected] 

Mac

npm install -g  [email protected] 

Replace 2.2.0 for the version you want

like image 29
Marcelo Agimóvel Avatar answered Sep 30 '22 19:09

Marcelo Agimóvel