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?
17.3 (LTS) | Node. js.
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.
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.
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.
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.
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
npm cache clean -f (force) clear you npm cachenpm install -g n install "n" (this might take a while)n stable upgrade to lastest versionIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With