Roman
Roman

Reputation: 2175

How to upgrade node.js from 0.12 version to 4.0 version on Windows and Ubuntu

I already have installed Node.js v0.12.2 on Windows and Node.js v0.12.4 on Ubuntu 14.04 LTS. Can I just run the latest installer to upgrade it to v4.0.0 on Windows and run sudo apt-get update on Ubuntu?

Upvotes: 11

Views: 10597

Answers (2)

Nicky
Nicky

Reputation: 3817

Maybe for future use on Windows, you can take a look at nvmw. Very easy to use and without manually modifying your configuration. When things break, you can just as easily switch back to older versions.

Similar package for Ubuntu: nvm

Upvotes: 0

Yuri Zarubin
Yuri Zarubin

Reputation: 11677

Windows has an installer available at https://nodejs.org/en/download/

For Ubuntu, the official instructions are

sudo apt-get remove nodejs
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

Find where node is

which node

Replace it with

sudo ln -sf /usr/bin/nodejs /path/you/find/node

Upvotes: 16

Related Questions