Skip to content

Instantly share code, notes, and snippets.

@arag0re
Last active April 7, 2022 13:22
Show Gist options
  • Save arag0re/e3cbee56ea3f6f3736ccb7d9f366c611 to your computer and use it in GitHub Desktop.
Save arag0re/e3cbee56ea3f6f3736ccb7d9f366c611 to your computer and use it in GitHub Desktop.
node and npm portable
  1. Get node binary (node.exe) from https://nodejs.org/download/release/ then select your preferred version and download node.exe on win or the tar.gz archive for your unix platform (darwin--.tar.gz or linux--.tar.gz)
  2. Create the folder where node will reside and move node.exe to it or on unix copy the extracted tar file to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment