How to upgrade nodejs from v0.12.2 on Windows? - node.js

I tried to install the latest version of NodeJS (v6.9.1 LTS and v7.1.0 Current) but I can't , ieven when I uninstall the nodeJS and install it again , I stuck with v0.12.2?
As a .net programmer , I need to instal visual studio 2015 , and I see the nodeJS v0.12.2 appears after I installed visual studio 2015.
anyone has any idea ?

Version v0.12.2 comes as a 32 bit installation with one of the Microsoft tools and it being in the path is picked up preferentially. To upgrade, install the 32 bit version of the nodejs from the official site. The path for this EXE is c:\Program Files(x86)\Nodejs
Once this is updated, you can uninstall the 32 bit version and install 64 bit version if needed.

I'm not sure how VS plays with NVM, but I'd recommend trying NVM: https://github.com/creationix/nvm
It lets you install multiple versions of Node.js. This is essential for a developer working on multiple Node projects which run different node versions.
nvm install 7.1
nvm use 7.1
node -v
> version 7.1
nvm install 4.4.9
nvm use 4.4.9
node -v
> version 4.4.9

You don't explain what you mean by "but I can't" - do you get any errors?
Since this question has too little details to answer I can only suspects what can be wrong. I suspect that you are installing the newer version of Node but the old is still a default. You need to set your PATH to include the path to the new Node earlier than the path to the old Node.
There are hundreds of tutorials online on how to install Node. Follow one of them and just make sure that your PATH is set up correctly.

it's a bit silly solution, but that's how it works for me.
Solution: Now I'm using Visual studio 2017 - the problem doesn't occur anymore!
basically I just upgrade to Visual Studio 2017 (clean install actually)

Related

Unable to downgrade Node to specific version

I am building a sample application in which I need to use Node Version v9.11.2 and npm 4.0.0. Currently I have Node Version v16.4.0 installed on my system. I tried to install the specific version by uninstalling the latest version and installing version 9.11.2 from official website
Problem: The problem is I can uninstall the latest version without any problem but when I try to install older version(9.11.2) the command gets opened and it does nothing. I also tried to install the older version using cli commands ie. npm install -g node#9.11.2, it installs the version but on checking the version using node -v, it still shows the latest version(16.4.0)
Below are the screenshots for better understanding
Installed version 9.11.2 but showing 16.4.0
Any Solution please ?
Is using docker a possibility? If so you can simply get a docker image of the required version and use if from there.
Another way is to use NVM which is a really useful tool to manage nodejs versions. I'm including their github repo for your convenience:
https://github.com/nvm-sh/nvm
A good option is to use NVM: https://github.com/coreybutler/nvm-windows (Windows) or https://github.com/nvm-sh/nvm (unix, macOS). With NVM you can enable different versions of node on the same machine and switch from one to another, usually it takes care of managing the installed packages and adding them to its own management system.

Visual Studio 2017 node version overrides nvm use version

I'm trying to learn Angular using asp.net core 2.0, since I have no experience with Node.js I'm trying to set up my environment using nvm, which I installed using chocolatey (just in case it makes a difference), as recommended by a friend, the tutorial I'm following tells me to use node 6.9.0 and have installed it and set it as active:
nvm install 6.9.0
nvm ls
nvm use 6.9.0
and I get the proper message telling me 6.9.0 is the active version. However when I do:
node --version
I get
v8.10.0
I use Visual Studio 2017 Pro for my everyday work, and I know it comes with its own version of node and I'm guessing that's what I'm seeing here and probably nvm will have no control over it as it not shown on the list of installed versions, and I know I haven't installed it myself. So my questions are:
What do I have to do to use the version I set with nvm?
Once I have that ready, what do I need to do to have VS use that version instead of its own?
I just worked out how to fix this, I'm posting an answer to help anyone else struggling with this, apparently, VS (or maybe myself :-( ) installed node directly and the one sitting on C:\Program Files\Nodejs was indeed version 8.10.0 and nvm was unable to change override it, so I just uninstalled the standalone node and ran the above commands on nvm and it worked like a charm.

I installed node.js v5.12.0 but the version showing v0.12.2

I installed Node.js from (https://nodejs.org/dist/latest-v5.x/node-v5.12.0-x64.msi), but the issue is , its showing version v0.12.2 instead of v5.12.0 which is required.
I try to update the node.js 5.2 installer but still showing version v0.12.2.
I have uninstalled Node.js and reinstall node-v5.12.0-x64.msi but still it’s not updated. Due to this am not able to run further commands for Ionic environmental setup.
Open a terminal and type where node
It should point to an old version of node (v0.12.2) still installed on your computer, for example C:\bin\node.
As Node.js is portable, you can have multiple versions on your computer.
If it cannot be uninstalled, simply delete C:\bin\node folder.
Then:
Open Windows System Properties/Advanced system properties
Click on Environment variables and edit PATH variable
Remove inside its value the path of the old version of node (C:\bin\node in our example).
Re-install Node v5.
Close your terminal and open a new one then type where node, it should point to Node.js v5
Most likely, you have an old Node version for x86 platform, and you are installing a newer version for 64 bit. Remove the path to the x86 from the Paths env variable, or move it to after the 64 bit path.
Solution:
List node.js installatios using nvm:
nvm ls
High chance the version you tried to install is also listed
Select the version to use using nvm
nvm use
(Not a direct solution)
You can try to install using nvm
Uninstall nodejs and follow the instruction from https://github.com/coreybutler/nvm-windows

Cannot install node.js under Windows 7: "the specified path is too long"

Using the newest node.js installer from https://nodejs.org, I run into the same error every time when it reaches the npm installation. npm 3.x was supposed to deal with this issue, but apparently it doesn't help the node.js installer. The node developers have essentially refused to do anything about it, as this problem has been around for about two years already. Unfortunately, I can't seem to find a work around. How can I get this to install?
I also had this error, trying to install node-v8.10.0-x64.msi on Windows 10.
My solution (to getting it to install; no idea if it won't break further down the line) was changing the install directory from C:/Program Files/nodejs to C:/njs/ (2nd step of current setup process).
I'm surprised those characters made the difference, and that there even is a Windows node release if there's not a proper solution to this (can't believe that maximum path length on Windows isn't modifiable), but this has seemingly worked for me.
I don't think its an installer error, actually windows is restricting the path size to be 150 char.
try reducing the file path name by copying it into direct c or d drive.
Check the link below Microsoft Forum
I've used Choco
It works together with NVM 4 Win.
After once installing node with choco install nodejs
then I install other versions of node using NVM e.g. nvm install 6.9.0
following by choosing that version with nvm use 6.9.0
and then verify with nvm list
and node -v.
I also need to install the latest version installed by choco using nvm install 10.1.0

How to install previous version of Node.js?

I am new to Node.js. The project i will be working on use 4.2.6 version. Im not sure How do i install this version on my local machine ( its Windows 10 64 bit). I tried browsing to previous versions here but there is no installer there.
The current Windows Installer on Nodejs.org in 4.3.1.
The installer is there, it's named node-v4.2.6-x64.msi.
You can use node version management. For example, marcelklehr/nodist:
> nodist + v4.2.6
# Just checks, if the version is installed and downloads it if not.

Resources