If you want to directly download node.exe (all distributions here) and run it by itself, including the infamous Node Package Manager NPM; here are the steps I took to accomplish this. This also applies to environments where you have restricted permissions and do not have administrative permissions. In such an instance you cannot use the installer which requires administrative permissions and would otherwise set up the PATH variable in Windows – which you cannot change anyways without admin permissions.
This all originated from the error: “npm should be run outside of the node repl, in your normal shell.”
Which I answered here at StackOverflow:
Here’s what I did for Windows
- Download the node.exe stand-alone from nodejs.org
- Grab an NPM release zip off of github
- Create a folder named: node_modules in the same folder as node.exe
- Extract the NPM zip into the node_modules folder
- Rename the extracted npm folder to npm and remove any versioning ie: npm-3.3.4 –> npm.
- Copy npm.cmd out of the /npm/bin/ folder into the root folder with node.exe
- Open a command prompt in the node.exe directory (shift right-click “Open command window here”)
- Now you will be able to run your npm installers ie:
npm install -g express
npm install express --save
Running the installers through npm will now auto install packages where they need to be located (node_modules and the root)
Don’t forget, you will not be able to set the path variable if you do not have proper permissions. So your best route is to open a command prompt in the node.exe directory to run commands (shift right-click “Open command window here”)