What command do I need to run to install specific version via npm?
通过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.
如果我运行代码npm install -g cordova,它会安装最新版本。由于我使用多台笔记本电脑和计算机,因此当我来回切换时,我需要它们具有相同的版本。
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版本:我想避免和更新它们,因为如果我使用最新版本,我可能会遇到错误。
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
顺便说一句,我通过github发现了这些版本https://github.com/driftyco/ionic-cli/releases
Thanks in advance for the help!
先谢谢您的帮助!
3 个解决方案
#1
59
To install specific version via npm, let's say IONIC 1.4.0, you can use npm install -g ionic@1.4.0
要通过npm安装特定版本,假设是IONIC 1.4.0,你可以使用npm install -g ionic@1.4.0
To view all available version use npm info ionic
.
要查看所有可用版本,请使用npm info ionic。
#2
1
In addition you can update your package.json file
此外,您可以更新package.json文件
e.g.
例如
"dependencies": {
"ionic": "^1.4.3"
}
Where 1.4.3
is ionic version.
其中1.4.3是离子型。
#3
1
Linux:
Linux的:
sudo npm install -g ionic@2.2.0
Mac
苹果电脑
npm install -g ionic@2.2.0
Replace 2.2.0 for the version you want
将2.2.0替换为所需的版本
#1
59
To install specific version via npm, let's say IONIC 1.4.0, you can use npm install -g ionic@1.4.0
要通过npm安装特定版本,假设是IONIC 1.4.0,你可以使用npm install -g ionic@1.4.0
To view all available version use npm info ionic
.
要查看所有可用版本,请使用npm info ionic。
#2
1
In addition you can update your package.json file
此外,您可以更新package.json文件
e.g.
例如
"dependencies": {
"ionic": "^1.4.3"
}
Where 1.4.3
is ionic version.
其中1.4.3是离子型。
#3
1
Linux:
Linux的:
sudo npm install -g ionic@2.2.0
Mac
苹果电脑
npm install -g ionic@2.2.0
Replace 2.2.0 for the version you want
将2.2.0替换为所需的版本