Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Node.js to latest version

So, I have Node.js installed and now when I tried to install Mongoosejs I got an error telling me that I don't have the needed version of Node.js (I have v0.4.11 and v0.4.12 is needed).

How can I upgrade to this version? I suppose I just could install it again with the latest version, but I don't want to do it before I'm sure that my project folders in the folder "node" won't be deleted.

like image 468
holyredbeard Avatar asked Apr 09 '12 16:04

holyredbeard


People also ask

Do I need to uninstall Node before installing new version?

Before installing the utility, it is recommended to remove all the existing versions of Node. js and npm from your Windows computer. This will prevent any conflict issues when installing the software.


1 Answers

Ubuntu Linux/Mac:

The module n makes version-management easy:

npm install n -g 

For the latest stable version:

n stable 

For the latest version:

n latest 

Windows:

just reinstall node from the .msi in Windows from the node website.

like image 79
Eldar Djafarov Avatar answered Oct 16 '22 01:10

Eldar Djafarov