Installing past or future versions of npm packages

[2015-12-20] dev, javascript, npm, nodejs
(Ad, please don’t block)

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

Example:

$ 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

Example:

$ npm view webpack versions

[ '0.1.0',
  '0.1.1',
  ···
  '1.12.8',
  '1.12.9',
  '2.0.0-beta',
  '2.0.1-beta' ]

Most popular (last 30 days)

Loading...