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.)
Use Node Version Manager (NVM)
It's a Bash script that lets you download and manage different versions of node. Full source code is here.
There is a separate project for nvm for Windows: github.com/coreybutler/nvm-windows
To upgrade node to the latest version or to a specific version you can do the following:
For the latest stable version:
Short & stupid answer:
Go to this page: Download | Node.js
Download the installer for your platform, then install it.
First update
npm
,npm install -g npm stable
Then update
node
,npm install -g node
ornpm install -g n
check after version installation,
node --version
ornode -v
This is a simple solution that works for all supported operating systems* including Windows:
(here is the original answer)
For Docker users, here's the official Node.js image.
PS: To check your Node version use
npm version
ornode --version
.PPS: Keep an eye on NodeJS blog - Vulnerabilities so you don't miss important security releases.
* Operating systems supported by Node.js: Windows, Linux, MacOS, SunOS, IBM AIX
On CentOS 7 you can do the following:
Note: The symlink is required to link your node binary with the latest Node.js installed binary file.