These are the steps that worked for me, no guarantees for anyone else... That said, this should work for most cases.
- Go to the Node.js downloads page
- Click on Other Downloads, DO NOT DOWNLOAD THE INSTALLER. Download the binary zip for your operating system, for Windows grab the Windows Binary matching your 32 or 64 bit system.
- Extract the zip file to an easy place to remember on your system, I use
C:\Node
- Open the "Edit Environment Variables for Your Account" tool by searching for the term "env" in the search bar next to your start button.
- You should see a variable named "Path" in the list, if not, you can add it by clicking New, otherwise, click the Path variable and then click Edit
- Add the path to the folder where you saved the
node.exe
file, make sure to use semi-colons to separate elements in the variable. In my case I added it to the end of the Path variable like so:...\bin;C:\Node;
(this will cover us for NPM as well) - Click OK to exit the envrionment variable editor.
## NPM - We want the 4.x branch (as of 5/24/2017)
Edit - The Node.js zip download now includes a version of NPM, use these instructions to have more control over the version of npm that you are running, but you might will be ok just using the one included with Node.
Go to the NPM github releases page at https://github.com/npm/npm/releasesDownload the latest full release, you want the Source Code (zip) option, you will see many pre-releases, ignore these unless you know what you're doing, the Latest Release will be marked with a green tag.Go to the location where you saved thenode.exe
file.Create a folder callednode_modules
next to thenode.exe
file, mine isC:\Node\node_modules
Extract the npm zip file into the new node_modules folderRemove the version number from the folder that gets placed into the node_modules folder, mine went fromC:\Node\node_modules\npm-4.5.0
toC:\Node\node_modules\npm
Copynpm.cmd
from...\npm\bin
to the folder withnode.exe
in my case I copied toC:\Node
- Open command propt
- Type
> node --version
and you should see something likev10.15.3
- Type
> npm --version
and you should see something likev6.4.1
You can update node by downloading the latest executable from the URL above and replacing node.exe
. NPM can be updated by following the steps above, or by running > npm install npm -g
from command prompt, this is usually easier.