Reputation: 4054
I want to upgrade Node.js on Ubuntu, but I want to make sure that if anything goes wrong I could revert back my source code, installed modules and node
binary to the working setup. How to achieve that?
Upvotes: 3
Views: 561
Reputation: 21639
You can install any version of node.js just go to downloads. Go into Other Releases and download what version you want with respect to your OS and 32-bit or 64-bit. Example:
node-vX.XX.X-OS-x64.tar.gz (64-bit)
node-vX.XX.X-OS-x86.tar.gz (32-bit)
Then, follow the instruction on the github.com. Building and installing Node.js
Another way is to use NVM
, the Node Version Manager (it works in a very similar way to rvm
for ruby). This allows to install and manage multiple versions of node. Here's a snippet (source):
Usage:
nvm install <version> Download and install a <version>
nvm use <version> Modify PATH to use <version>
nvm ls List versions (installed versions are blue)
You can also check this n
. A Simple flavour of node binary management.
nvm ls
which lists already installed version(s) ready to use.
amolkulkarni@ubuntu:~$ nvm ls
current: v0.10.18
Upvotes: 6
Reputation: 13539
You should use Node Version Manager https://github.com/creationix/nvm
Upvotes: 2