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.
Following Upgrading Node.js to latest version
For Upgrading Node.js to latest version
If you need to do Undo then follow command
This method of upgrading node is now unstable and should not be used. The best way to manage Node.js versions is to use NVM: Node Version Management.!
Installation
You can read the installation steps on the nvm [GitHub page][1]. There are only two easy steps for installation and configuration. Using nvm
If you work with a lot of different Node.js utilities, you know that sometimes you need to quickly switch to other versions of Node.js without hosing your entire machine. That's where you can use nvm to download, install, and use different versions of Node.js:
At any given time you can switch to another with use:
my 2c:
I tried both with n and with nvm on Linux Ubuntu 12.04 LTS, in order to update node from v0.8.25 to v0.10.22.
The first one was successfully completed, but the command 'which node' resulted in the old v0.8.25.
The second one was successfully completed and the same command resulted in v.0.10.22.
will upgrade to the latest version of the node
Re-install the latest version of nodejs by downloading the latest .msi version from nodejs website here, https://nodejs.org/en/download/
It worked for me in my windows machine.
For Windows users, simply go to the node.js (nodejs.org) website and download the latest version (8.6.0 as of 09/29/2017). Follow the steps from the auto install window and you're good to go. I just did it and when I checked my latest version in webstorm, it was already there.
On Windows download latest "Windows Installer (.msi)" from https://nodejs.org/download/release/latest/ and install same directory , thats all...
After complete the installation above, the NodeJS and NPM will be upgraded to the latest one and then you can cleanup the package as normal as:
Note
You can always check the version with following command: