How to install specific version of ionic via npm

后端 未结 4 691
悲哀的现实
悲哀的现实 2020-12-09 07:43

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\

相关标签:
4条回答
  • 2020-12-09 08:22

    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.

    0 讨论(0)
  • 2020-12-09 08:32

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

    npm install ionic@3.2.0 --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

    0 讨论(0)
  • 2020-12-09 08:33

    In addition you can update your package.json file

    e.g.

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

    Where 1.4.3 is ionic version.

    0 讨论(0)
  • 2020-12-09 08:34

    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

    0 讨论(0)
提交回复
热议问题