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.
35 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.
All Platforms (Mac, Linux & Windows) 2022
If you just need to upgrade your old version of Node.js to the latest one and don't need multiple versions, simply over-write your existing executable with the new one.
Download the Latest Node.js from
This Just Works! TM on all platforms and is the easiest/fastest method.
When you run node -v in your terminal you will see the the latest version.
Mac
If you originally installed Node.js using brew then run:
brew upgrade node