Other than going to http://search.npmjs.org and search for it?
I usually need the version to put it in my package.json
.
Since I had to google it myself:
After finding the specific version you want, install it using npm install -g [package-name]@[your-version]
Example:
$ npm view npm dist-tags
{ latest: '1.4.20',
'1.4': '1.4.6',
'1.2': '1.2.8000',
'v1.5rc': '1.5.0-alpha-1' }
$ npm install -g npm@1.2
Use npm view [package-name] dist-tags
in the command line.
Example:
$ npm view express dist-tags
{ latest: '2.5.9',
'3.0': '3.0.0beta2' }