// 查看node版本
$ node -v
how to determine whether I have 64bit or 32 bit node executable installed?
// It will return 'arm', 'ia32', or 'x64'.
node -p "process.arch"
// node -p "process"
and you should see the content of the process variable formatted. There the keys arch a
{
title : 'Administrator: C:\\Windows\\System32\\cmd.exe - node ',
version : 'v0.10.36',
moduleLoadList :
[ 'Binding evals',
...
'Binding signal_wrap',
'NativeModule string_decoder'],
versions : {
http_parser : '1.0',
node : '0.10.36',
v8 : '3.14.5.9',
ares : '1.9.0-DEV',
uv : '0.10.30',
zlib : '1.2.8',
modules : '11',
openssl : '1.0.1l'
},
arch : 'x64',
platform : 'win32',
argv : ['node'],
execArgv : [],
env : {
ALLUSERSPROFILE : 'C:\\ProgramData',
HOMEDRIVE : 'C:',
JAVA_HOME : 'C:\\Program Files\\Java\\jdk1.8.0_05',
NODEJS : 'C:\\Program Files (x86)\\nodejs\\',
NUMBER_OF_PROCESSORS : '4',
OS : 'Windows_NT',
Path : 'C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;',
PATHEXT : '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY',
PROCESSOR_ARCHITECTURE : 'AMD64',
PROCESSOR_IDENTIFIER : 'Intel64 Family 6 Model 42 Stepping 7, GenuineIntel',
PROCESSOR_LEVEL : '6',
PROCESSOR_REVISION : '2a07',
ProgramData : 'C:\\ProgramData',
ProgramFiles : 'C:\\Program Files',
'ProgramFiles(x86)' : 'C:\\Program Files (x86)',
ProgramW6432 : 'C:\\Program Files',
PROMPT : '$P$G',
PUBLIC : 'C:\\Users\\Public',
PYTHON : 'C:\\Python34',
SESSIONNAME : 'Console',
SystemDrive : 'C:',
SystemRoot : 'C:\\Windows',
windir : 'C:\\Windows',
windows_tracing_flags : '3'
},
features : {
...
},
config : {
...
}
}