Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
538 views
in Technique[技术] by (71.8m points)

node.js - 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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 ionic@1.4.0

Notes

To see all available versions use: npm info ionic.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...