Installing past or future versions of npm packages

By Axel Rauschmayer

npm lets you install versions of packages other than the current one, via:

    npm install "package-name»@"tag»
    npm install "package-name»@"version»

Installing tags

Tags are aliases for versions. You can look up available tags via:

    npm view "package-name» dist-tags


    $ npm view webpack dist-tags
    { latest: '1.12.9', beta: '2.0.1-beta' }

Installing versions

You can look up available versions via:

    npm view "package-name» versions


    $ npm view webpack versions
    [ '0.1.0',
      '2.0.1-beta' ]

Source:: 2ality