node.js - How do I install a previous version of an npm package? -


i used nvm download node v0.4.10 , installed npm work version of node.

i trying install express using

npm install express -g 

and error express requires node version >= 0.5.0.

well, odd, since following directions node+express+mongodb tutorial here used node v0.4.10, assuming express is/was available node v0.4.10. if assumption correct, how tell npm fetch version work setup?

if have install older version of package, specify it

npm install <package>@<version> 

for example: npm install express@3.0.0

you can add --save flag command add package.json dependencies, or --save --save-exact flags if want exact version specified in package.json dependencies.

the install command documented here: https://docs.npmjs.com/cli/install

if you're not sure versions of package available, can use:

npm view <package> versions 

and npm view can used viewing other things package too. https://docs.npmjs.com/cli/view


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -