How to install older version of node.js on Windows? - node.js

I need to install node.js of version 4.0.0
I tried this:
npm install -g npm#4.0.0
But I got this message: npm is not recognized as an internal or external command, operable program or batch file

Go here and find the version you want to install and then download the correct msi file and run the installer. You cannot install node by running this command, also the error you receive is stating that npm is not on your path which suggests machine doesn't currently have node installed on it

Just uninstall whatever node version you have in your system.
Then go to this site
https://nodejs.org/download/release/
and choose your desired version like for me its like v7.0.0/ and
click on that go get .msi file of that.
Finally you will get installer in your system, so install it.
It will solve all your problems.

For windows, best is: nvm-windows
1)install the .exe
2)restart (otherwise, nvm will not be undefined)
3)run CMD as admin,
4)nvm use 5.6.0
Note: You MUST run as Admin to switch node version every time.

run:
npm install -g node#7.10.1
- or whatever version you want after the # symbol (This works as of 2019)

At first, you will need to uninstall nodejs from the system preferably from Add or Remove Programs or Control Panel. Then, go to nodejs official site, scroll down to find previous releases like in image
click on previous releases and type in the version you are searching for in the search box
Go to downloads and finally select a msi file from the list

You can use Nodist for this purpose. Download it from here.
Usage:
nodist List all installed node versions.
nodist list
nodist ls
nodist <version> Use the specified node version globally (downloads the executable, if necessary).
nodist latest Use the latest available node version globally (downloads the executable, if necessary).
nodist add <version> Download the specified node version.
More Nodist commands here

Related

How to install Node 14 version on windows

I want to install Node.js version 14 on Windows but it is not installing instead it is showing below screen.
But when I try to install Node.js v17, it is opening installation wizard by which I can install Node.js but this is not happening for Node.js 14. How can I install Node.js v14?
I downloaded the exe from https://nodejs.org/en/blog/release/v14.17.3/
It is easier to use nvm for node installation. It allows you to quickly install and use different versions of node via the command line
It is available on Linux/Mac and Windows
You can find the setup file in the releases section and install it
To install node v14 you just need to execute 2 comands
nvm install 14
nvm use 14
If you've downloaded the exe, there's no installation needed - you already have the executable, and as you can see, it's operational - when you run it, you get Node.js' REPL.
If you want to "properly" install Node.js you could download and run the MSI from the link instead of the exe.
So, you get an executable file when you download it? You might have downloaded the zip archive instead of the installer. There can be many ways to install node into your Windows machine.
Using nvm (recommended)
You can use nvm to keep multiple versions of node and toggle between them when needed.
nvm install 14
nvm use 14
Ref: NVM Readme
Using MSI Installer
Download the msi installer from the website Previous Releases page if you want a specific older version. Here is a link for v14.18.2-x64.
Using Zip Archive (the hard way)
If you want to do it by using the file you already downloaded, what you can do is:
Save that exe file to a specific location you want (It is recommended to save all the executable binaries in bin directory in your User directory, similar to how we do in Linux systems).
Copy the path to that file (e.g., C:\Users\erajendr\bin\node.exe).
Search for Edit the system environment variables in Cortana search.
Look for a variable with name "Path".
Double click on the variable.
Add the copied path to the list of existing paths there.
You can test if this works by typing node in a fresh new terminal/cmd.
Ref: How to add Path in Windows 10

Can I upgrade Node.js using command line in Windows?

Is it possible to update node using command line/PowerShell in windows 10?
Surely, I can download the latest version from the official site and install, but, I'm hoping for a way to do it from cmd.
Right now, I've npm and yarn installed on my system if that helps.
Perhaps nvm-windows is what you are looking for.
After installing this program on your computer, you will be able to use nvm command (Node Version Manager) in windows command line and manipulate with node.js versions.
Commands that you probably need are:
nvm install latest: To install the latest stable version
nvm list available: Show a list of versions available for download.
nvm use <version>: Switch to use the specified version.
More information here
Since you have npm you can use this command in powershell:
npm install npm#latest -g
If you want documentation to refer to you can use:
npmjs documentation

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

installation of node fails because of unsufficient priviliges to enter the folder

Trying to install latest version of node on win10, I run the msi install package and halfway through the installation it tells me that it does not have sufficient permissions and that it needs administrator permissions. I cancel the install and try to run it again as administrator however it seems that for .msi file types win10 does not offer to run as administrator.
It offers
instal
repair
uninstall
How can i install node? I wanted to update my current node version to latest, should I perhaps uninstall first and then try to install?
You can:
install it somewhere else and use it from there
install it somewhere else and move it later
use the ZIP package and move the files where you want
download the EXE file
install from source
use nvm
See files in:
https://nodejs.org/dist/v7.9.0/win-x64/
and:
https://nodejs.org/dist//v7.9.0/
nvm for Windows:
https://github.com/coreybutler/nvm-windows

nodejs: Later version of Node.js is already installed. Setup will now exit

Version: 8.0.0 / 7.6.0 / 7.7.1
Platform: win 10 x64
i have installed 8.0.0 nightly before ( for use async )
when 7.6.0 out, i try install 7.6.0
installer show msg " Later version of Node.js is already installed. Setup will now exit "
i unzip Binary (.zip) for force install 7.6.0
but now
i wanna install 7.7.1
this msg show up again
i tryed search all node.js or 8.0.0 at Registry
and replace it to 7.6.0
the installer still not allow install
where can let me install new version without upzip for replace every time?
i can't use uninstaller
cos i don't sure what will be remove by uninstaller
my nodejs installed at msys2 folder
any way let me can do update new version by Windows Installer (.msi) ?
i just need update old nodejs version to Latest Current Version
by normal way at now and future
i didn't try uninstall,
cos my node install folder is "C:\msys64\mingw64\bin",
my node_modules at "C:\msys64\mingw64\bin\node_modules",
im "not sure" uninstaller will "only" remove node js and npm only without delete other file at "C:\msys64\mingw64\bin"
Execute the previous installed version of .msi (node-v8.9.0-x64.msi) file it will get in to the setup wizard and you can see the option for repair, remove, etc.. you can select remove, this will uninstall completely the previous version. now you can install your desired version.
search file at
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Node.js
Uninstall Node.js.lnk
C:\Windows\SysWOW64\msiexec.exe /x {65370F5F-81AF-453E-BD85-A05B561DB989}
search 65370F5F-81AF-453E-BD85-A05B561DB989 at Registry
(i use RegistryWorkshop
one of will like this
**HKEY_CLASSES_ROOT\Installer\Products** {xxx}
ProductIcon
edit DWORD Version 0x8000000 mean 8.0.0
edit it low or equal than version u wanna edit
like 0x7000000
than now can keep use installer like old day
go to Control Panel>All Control Panel Items>Programs and Features
uninstall Node JS.
Reinstall your preferred version from the Node JS website and good luck!
worked for me
Change Your NPM Version to LTE
Check please https://github.com/deepbag/nvs it's the best solution for this problem.
Node Version Switcher - A cross-platform tool for switching between versions and forks of Node.js
Install NVS ---- Command Line Run Administration Mode
Windows:
choco install nvs
Mac|Linux :
export NVS_HOME="$HOME/.nvs"git clone https://github.com/jasongin/nvs "$NVS_HOME". "$NVS_HOME/nvs.sh" install
Add LTS Version NVS ---- Command Line Run Administration Mode
$ nvs add lts
$ nvs use lts (Output : PATH += ~/.nvs/node/6.9.1/x64)
$ nvs link lts
$ npm install -g npm
Successful Your NPM Version Changed and Updated

Resources