How to install Nodejs

Download the Nodejs installer at

https://nodejs.org/en/download/
or
https://nodejs.org/en/download/package-manager/


How to install Nodejs on Windows XP

I've an old Lenovo G430 notebook. It's 11 years old :)

------------------
System Information
------------------
Time of this report: 3/3/2019, 09:22:41
Machine name: XXXXXXXXXXXXXXXXXX
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 3 (2600.xpsp.080413-2111)
Language: English (Regional Setting: English)
System Manufacturer: LENOVO
System Model: Lenovo 3000 G430
BIOS: Rev 1.0
Processor: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz (2 CPUs)
Memory: 1912MB RAM
Page File: 1008MB used, 4576MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 9.0c (4.09.0000.0904)
DX Setup Parameters: Not found
DxDiag Version: 5.03.2600.5512 32bit Unicode

Download the last Node version v4.1.2 which supports Windows XP 32-bit

https://nodejs.org/en/blog/release/v4.1.2/
or
https://nodejs.org/dist/v4.1.2/node-v4.1.2-x86.msi

Working behide a proxy?

Read this http://tuan.nguoianphu.com/Nodejs-proxy-configuration

Wait, my C: drive doesn't have enough space for nodejs and npm libraries :(

Let install the nodejs in the D: drive at D:\code\nodejs

Then, edit the C:\Documents and Settings\YOUR_USER_NAME\.npmrc with below

cache=D:\code\nodejs\nodewin\npm-cache
init-module=D:\code\nodejs\nodewin\.npm-init.js
userconfig=D:\code\nodejs\nodewin\.npmrc
prefix=D:\code\nodejs\node_modules\npm

Now, every npm packages will be downloaded to D: drive.


Install Gulp and Grunt on Windows XP

Not sure why but I can't install gulp and grunt by running the common commands

npm install --global grunt
npm install --global gulp-cli
npm install --global gulp

The packages are downloaded but the cmd can't call call them. :(

I have to open a cmd in D:\code\nodejs\nodewin\npm and run these commands to download the pacakges into this folder.

npm install --global grunt --save-dev
npm install --global grunt-cli --save-dev
npm install --global gulp-cli --save-dev
npm install --global gulp --save-dev

Then create some files in D:\code\nodejs\nodewin\npm like

grunt.cmd

@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\grunt-cli\bin\grunt" %*
) ELSE (
node "%~dp0\node_modules\grunt-cli\bin\grunt" %*
)

grunt

#!/bin/sh
basedir=`dirname "$0"`

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/node_modules/grunt-cli/bin/grunt" "$@"
ret=$?
else
node "$basedir/node_modules/grunt-cli/bin/grunt" "$@"
ret=$?
fi
exit $ret

gulp.cmd

@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\gulp-cli\bin\gulp" %*
) ELSE (
node "%~dp0\node_modules\gulp-cli\bin\gulp" %*
)

gulp

#!/bin/sh
basedir=`dirname "$0"`

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/node_modules/gulp-cli/bin/gulp" "$@"
ret=$?
else
node "$basedir/node_modules/gulp-cli/bin/gulp" "$@"
ret=$?
fi
exit $ret

Loading