I did the following to update my npm:
npm update npm -g
But I have no idea how to update Node.js. Any suggestions? (I'm using Node.js 0.4.1 and want to update to Node.js 0.6.1.)
I did the following to update my npm:
npm update npm -g
But I have no idea how to update Node.js. Any suggestions? (I'm using Node.js 0.4.1 and want to update to Node.js 0.6.1.)
If you have Homebrew installed (only for OS X):
Install nvm(cURL)
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
OR with Wget
$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
Display list of installed versions
$ nvm ls
Display list of versions that are available to install
$ nvm ls-remote
Install your preferred version
$ nvm install v7.5.0
Set this version as the default
$ nvm alias default v7.5.0
All you need to version update of Node.js:
If you don't have Homebrew; please go http://brew.sh/.
I had the same problem, when I saw that my Node.js installation is outdated.
These few lines will handle everything (for Ubuntu):
After this
node -v
will return you the latest available version.You may use nvm.
nvm install v0.10.26
Done.
You can choose which version to run:
nvm ls
list the available versions and tells you which version you are using now.nvm use VERSION
change the current node to the requested version.nvm alias default VERSION
set the default version. The next time you source nvm.sh, this will be the version loaded (note that it doesn't change the version in use right now, runnvm use
for that).You may use Chocolatey on Windows. It's very easy to use and useful for keeping you updated with other applications too.
Also, you can just simply download the latest version from https://nodejs.org and install it.