Installing Node.js (and npm) on Windows 10 - Stack Overflow
[How-To] Install Node.js on Windows the Recommended Way
Hi! How can I install Node.js on my windows?
DOWNLOADING NODE.JS IN WINDOWS 7
Does npm install work on Windows?
What is “npm i” and “npm install”?
What is the use of npm install?
Videos
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.
THe same Article Guide I wrote is linked here Article Link and has Photos for a nicer reading experience!
Download the nvm-setup.exe in the link below
NVM for Windows Download
Run the nvm-setup.exe by clicking on it and follow the on screen setup instructions
Check 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