如何通过 npm 安装特定版本的 ionic [英] How to install specific version of ionic via npm

查看:88
本文介绍了如何通过 npm 安装特定版本的 ionic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要运行什么命令才能通过 npm 安装特定版本?

如果我运行代码 npm install -g cordova,它会安装最新版本.由于我使用多台笔记本电脑和计算机,因此在来回切换时需要它们具有相同的版本.

这是我正在使用和首选的 IONIC 版本:我想避免并更新所有这些,因为如果我使用最新版本,我可能会遇到错误.

Ionic CLI 已过时:本地安装版本:1.3.20* 最新版本:1.4.3* https://github.com/driftyco/ionic-cli/blob/master/CHANGELOG.md* 运行 npm install -g ionic 进行更新

顺便说一句,我通过 github https://github.com/driftyco/ionic-cli/发布

预先感谢您的帮助!

解决方案

语法

要通过npm安装特定版本,请使用以下语法 应该遵循:

npm install -g ionic@VERSION

  • 其中 VERSION 是我们要从 Ionic安装版本号强>

示例

假设我们要安装IONIC 1.4.0,因为您应该指定:

npm install -g ionic@1.4.0

<块引用>

注意事项

要查看所有可用版本,请使用:npm info 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!

解决方案

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.

这篇关于如何通过 npm 安装特定版本的 ionic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆