If you have installed node.js v0.6.16 for Windows and you want to install socket.io with the following command:
npm install socket.io |
Then it could happen that you will get this error message on Windows 7 (64-Bit):
> node install.js npm ERR! Error: spawn ENOTSUP npm ERR! at errnoException (child_process.js:483:11) npm ERR! at ChildProcess.spawn (child_process.js:446:11) npm ERR! at Object.spawn (child_process.js:342:9) npm ERR! at spawn (C:\Program Files (x86)\nodejs\node_mod npm ERR! at exec (C:\Program Files (x86)\nodejs\node_modu npm ERR! at Array.0 (C:\Program Files (x86)\nodejs\node_m npm ERR! at EventEmitter._tickCallback (node.js:192:40) |
Fortunately, there is a solution! Open this file:
C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\exec.js |
Replace these two lines (around line 109 & 110):
if (!isNaN(uid)) opts.uid = uid if (!isNaN(gid)) opts.gid = gid |
That’s all. For more information see: Error on socket.io installing on Windows 7.
With these ones:
if (uid && !isNaN(uid)) opts.uid = +uid if (gid && !isNaN(gid)) opts.gid = +gid |