Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change to an older version of Node.js

Tags:

node.js

I am running Node.js version v0.5.9-pre on Ubuntu 10.10.

I would like to be using version v0.5.0-pre.

How do I roll back to the older version of node?

like image 554
JD Isaacks Avatar asked Oct 10 '11 20:10

JD Isaacks


People also ask

How do I revert to an older version of node?

To change Node. JS versions, we have to first download the version we want. Make sure you have nvm installed first. If you don't know the version you want to install, type nvm ls-remote to get a full list of all installable Node.

How do I change node js version?

Switching among Node. 7; we can simply run either nvm use 12.22. 7 or nvm use 16.13. 0 to easily switch into either version we need. Note that since we only have one version that begins with 12, 14, or 16, we can switch versions with a simple nvm use 16 , nvm use 14 , or nvm use 12 command.

Can you downgrade node JS?

Nodejs can be upgraded or downgraded using different methods some of them are by manually downloading the latest version of node from their official nodejs.org website and the second method is by using nvm which is really helpful in controlling the node version.


1 Answers

*NIX (Linux, OS X, ...)

Use n, an extremely simple Node version manager that can be installed via npm.

Say you want Node.js v0.10.x to build Atom.

npm install -g n   # Install n globally n 0.10.33          # Install and use v0.10.33 
Usage: n                            # Output versions installed n latest                     # Install or activate the latest node release n stable                     # Install or activate the latest stable node release n <version>                  # Install node <version> n use <version> [args ...]   # Execute node <version> with [args ...] n bin <version>              # Output bin path for <version> n rm <version ...>           # Remove the given version(s) n --latest                   # Output the latest node version available n --stable                   # Output the latest stable node version available n ls                         # Output the versions of node available 

 

Windows

Use nvm-windows, it's like nvm but for Windows. Download and run the installer, then:

nvm install v0.10.33         # Install v0.10.33 nvm use v0.10.33             # Use v0.10.33 
Usage: nvm install [version]        # Download and install [version] nvm uninstall [version]      # Uninstall [version] nvm use [version]            # Switch to use [version] nvm list                     # List installed versions 
like image 106
Dennis Avatar answered Sep 25 '22 13:09

Dennis