Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not seeing latest version when updating Node.js via installer (MSI) Windows 7

I'm trying to update node on my Windows 7 box but I'm not seeing the latest version after I re-install/update node.

I'm just going out to http://nodejs.org/download/ and getting the latest Windows installer, v0.10.28. I then just run that installer where it defaults to installing everything on my local hard drive, including npm, which is cool because I wanted to upgrade that as well.

Install runs/finishes with no apparent problem, but when I do a:

node --version 

I'm still seeing my "old" version, v0.10.15, not the latest I supposedly just installed, v0.10.28. My npm version still reports my "old" version as well.

I've tried rebooting as well.

How the heck does one update node/npm?

like image 751
magenta placenta Avatar asked May 29 '14 18:05

magenta placenta


People also ask

What is the latest version of node JS for Windows 7?

17.3 (LTS) | Node. js.

How can I update my Nodejs to the latest version?

To use this method for updates, follow the steps below: Run npm -v to see which installed version you're currently using. Run npm install npm@latest -g to install the most recent npm update. Run npm -v again to validate that the npm version was updated correctly.

Is node JS not supported in Windows 7?

If you can see something like this on your screen, that means Node. js is installed on your Windows 7 and working perfectly. If you want to check which npm version is installed simply type npm -v and hit that big juicy ENTER key on your keyboard. You will get to know the npm version installed in your System.

How do I update Nodejs to a specific version of Windows?

Just visit the Node installers page at https://nodejs.org/en/download/ and download and install the latest node version. From the “previous releases” section at the bottom of the page, you can select a specific version to install.


2 Answers

I had a similar problem but on MacOS and the reason was I had nvm installed. So running the commands found on most websites:

sudo npm cache clean -f sudo npm install -g n sudo n stable 

didn't work, node -v still displayed the old version. What I did was to install node from nvm:

nvm install v0.12.6 

This will build node from scratch on your machine, and then node -v will display the correct version. I think I could have still used the previous commands by using n and then do nvm use v0.12.6, but this is something to test. If you have nvm installed, just check the commands for nvm to upgrade node.

like image 194
eloone Avatar answered Sep 25 '22 08:09

eloone


Answer given by Johan Dettmar about using n will work here as well.

For Windows : open command prompt as administrator

For Linux/Mac : sudo -s on terminal

  1. npm cache clean -f (force) clear you npm cache
  2. npm install -g n install "n" (this might take a while)
  3. n stable upgrade to lastest version
like image 34
Sumit Ramteke Avatar answered Sep 24 '22 08:09

Sumit Ramteke