Black lives matter
Portrait Dr. Axel Rauschmayer
Dr. Axel Rauschmayer
Homepage | Twitter
Cover of book “JavaScript for impatient programmers”
Book, exercises, quizzes
(free to read online)
Cover of book “Deep JavaScript”
Book (50% free online)
Cover of book “Tackling TypeScript”
Book (first part free online)
Logo of newsletter “ news”
Newsletter (free)

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


$ 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' ]