Factsheet
[How-To] Install Node.js on Windows the Recommended Way
Installing Node.js (and npm) on Windows 10 - Stack Overflow
node.js - How to install NodeJS LTS on Windows as a local user (without admin rights) - Stack Overflow
Hi! How can I install Node.js on my windows?
Videos
The same Article Guide I wrote is linked here Article Link and has Photos for a nicer reading experience!
Download the
nvm-setup.exein the link below NVM for Windows DownloadRun the
nvm-setup.exeby clicking on it and follow the on screen setup instructionsCheck if you installed NVM sucessfully by using the command
nvm --versionin a Windows TerminalTo install Node.js with nvm you can now run
nvm install ltsto install the long term support version of nodeCheck which versions of node you have then use it as shown with
nvm listand thennvm usemake sure you are in administrator modeCheck if node is working by running
node --version
Edit: It seems like new installers do not have this problem anymore, see this answer by Parag Meshram as my answer is likely obsolete now.
Original answer:
Follow these steps, closely:
- http://nodejs.org/download/ download the 64 bits version, 32 is for hipsters
- Install it anywhere you want, by default:
C:\Program Files\nodejs - Control Panel -> System -> Advanced system settings -> Environment Variables
- Select
PATHand choose to edit it.
If the PATH variable is empty, change it to this: C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
If the PATH variable already contains C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm, append the following right after: ;C:\Program Files\nodejs
If the PATH variable contains information, but nothing regarding npm, append this to the end of the PATH: ;C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
Now that the PATH variable is set correctly, you will still encounter errors. Manually go into the AppData directory and you will find that there is no npm directory inside Roaming. Manually create this directory.
Re-start the command prompt and npm will now work.
go to http://nodejs.org/
and hit the button that says "Download For ..."
This'll download the .msi (or .pkg for mac) which will do all the installation and paths for you, unlike the selected answer.
UPDATE 10/2018
On Node's download page referenced in step 1. there is now a .zip archive download which contains both the nodejs executable and npm. Unpacking that to a suitable path and adding this path to your PATH environment variable (step 2.) will give you both node and npm (so you can skip steps 3. - 6.).
Let say you want to install it into %userprofile%\Applications\nodejs-lts, let's name it <NODE_PATH>.
Download the LTS
node.exebinary for Windows and copy it to<NODE_PATH>.Add
<NODE_PATH>to yourPATHenvironment variable (set PATH=<NODE_PATH>;%PATH%or using Windows user interface)Download the stable at
https://registry.npmjs.org/npm/-/npm-{VERSION}.tgznpm package (following the documentation)Unzip the
npm-{VERSION}.tgzanywhere (using 7zip for example)Launch a
cmdandcdinto the place where you have unzipped npmExecute:
node cli.js install -gfornode bin/npm-cli.js install npm -gfon certain versions (thanks to this comment)
The last command is specified in the Makefile for target install, target which the README.md invites to execute when manually installing.
The nodejs version of 6.11 LTS and later seems to be easier to install, because npm is already included.
- Download the node.js LTS binary for Windows and extract it to your desired location
- Add the path of the nodejs folder to the PATH environment variable:
(Shortcut winkey+R and enter:
rundll32 sysdm.cpl,EditEnvironmentVariables) - Open a new command window (winkey+R and type
cmd) - Type
node -vandnpm -vto verify the installation