[How-To] Install Node.js on Windows the Recommended Way
Installing Node.js (and npm) on Windows 10 - Stack Overflow
installation - How to install older version of node.js on Windows? - Stack Overflow
[How-To] Install Node.js on Windows the Recommended Way : node
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.
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.