- Get node binary (node.exe) from http://nodejs.org/download/
- Create the folder where node will reside and move node.exe to it
- Download the last zip version of npm from http://nodejs.org/dist/npm
- Unpack the zip inside the node folder
- Download the last tgz version of npm from http://nodejs.org/dist/npm
- Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
- Add the the node folder and the packages/bin folder to PATH
- On a command prompt execute
npm install -g npm
to update npm to the latest version
Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.
This is actually a great guide but the comments may unnecessarily confuse people looking at this.
a) It doesn't matter whether npm is out of date, that's why it says "npm install -g npm". As of npm 3.10.8, updating to that version straight from 1.4.9 works just fine.
b) You don't need any other guide or prepackaged thing.
The only thing I'd change about this guide is using something like the following command for updating npm instead:
Because IMO, using the global flag is against the whole point of creating a portable node/npm "bundle".
(as for "npm@latest" - simply because it seems to be the officially recommended way of doing things)
Also note that setting the PATH is important for using this portable bundle, even if you create/copy it straight to the root of your project. I thought to myself "I can call everything straight from there - what could possibly happen?". But then one of the tools I used tried to launch a sub process in one of the sub directories. And of course, there, all the tools couldn't be found.