- 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 npmto 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.
@WillRubin Oh your right i didnt really notice that because my requirement were run and then delete off of a windows server with out leaving stuff configured, I'm assuming this is for a thumb drive so you can try the following:
Set the thumb drive letter to something that will NOT change between systems like
Potherwise stuff breaksextract the zip files to that drive in the location you want node.js like before im going to assume
P:\node-v22.0.0-win-x64\edit the 4th line of nodevars.bat from
set "PATH=%APPDATA%\npm;%~dp0;%PATH%"toset "PATH=%~dp0;%PATH%"then open a new command prompt and type
cd /d P:\node-v22.0.0-win-x64\then
npm install npm@latestthat should throw everything intoP:\node-v22.0.0-win-x64\i have zero clue what the repercussions of doing this are but stuff seems to work.when you open a command prompt and type
P:\node-v22.0.0-win-x64\nodevars.batit should addP:\node-v22.0.0-win-x64\to your systems %PATH% for that command prompt session.if stuff breaks try installing npm in a different location it just uses whatever folder you are in unless you use -g in which case it uses %appdata% you can override this with --prefix ./ but that location has to be in your path for stuff to work