title: Get socket.io to work on Windows 7 x64-bit platform
body: <p>Installation of socket.io package on Windows 7 x64 bit environment over Express 3.x gives me very hard time.</p>
  
  <p>I had to sort out tens or compilation errors and I had to install the following Windows 7 package for the installation process output no error:</p>
  
  <ul>
  <li>Cygwin C++ compiler </li>
  <li>Cygin C++ extra-library</li>
  <li>Microsoft Visual Studio 2010 Express</li>
  <li>Microsoft .NET Framework v2.0</li>
  <li>Microsoft Performance Toolkit Microsoft Windows SDK 7.1 </li>
  <li>Microsoft Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1.</li>
  </ul>
  
  <p>(Visual Studio compiler gives me a warning C4267 (see bellow))</p>
  
  <p>Despite of that correct installation I still have client side error:</p>
  
  <pre><code>Error: io is not defined
  var socket = io.connect('/');
  </code></pre>
  
  <p>I followed the recommendation for <code>socket.io.js</code> to be served by nodejs server with app.js:</p>
  
  <pre><code>var express = require('express')
      , http = require('http');
  
  var app = express();
  var server = http.createServer(app);
  var io = require('socket.io').listen(server);
  </code></pre>
  
  <p>Client side decalaration in jade file is :</p>
  
  <pre><code>script(src='/socket.io/socket.io.js')
  </code></pre>
  
  <p>And my client script section for socket.io is :</p>
  
  <pre><code>var socket = io.connect('/');
  </code></pre>
  
  <p>socket.io is installed into the <code>node-login</code> directory which is where are located my <code>app/public</code> and <code>app/server</code> directories.</p>
  
  <p>socket.io installation log:</p>
  
  <pre><code>D:\dev\node-login&gt;npm install socket.io
  npm http GET https://registry.npmjs.org/socket.io
  npm http 304 https://registry.npmjs.org/socket.io
  npm http GET https://registry.npmjs.org/socket.io-client/0.9.11
  npm http GET https://registry.npmjs.org/policyfile/0.0.4
  npm http GET https://registry.npmjs.org/base64id/0.1.0
  npm http GET https://registry.npmjs.org/redis/0.7.3
  npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11
  npm http 304 https://registry.npmjs.org/base64id/0.1.0
  npm http 304 https://registry.npmjs.org/policyfile/0.0.4
  npm http 304 https://registry.npmjs.org/redis/0.7.3
  npm http GET https://registry.npmjs.org/uglify-js/1.2.5
  npm http GET https://registry.npmjs.org/ws
  npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
  npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
  npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
  npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
  npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
  npm http 304 https://registry.npmjs.org/ws
  npm http GET https://registry.npmjs.org/zeparser/0.0.5
  npm http GET https://registry.npmjs.org/commander
  npm http GET https://registry.npmjs.org/options
  npm http 304 https://registry.npmjs.org/zeparser/0.0.5
  npm http 304 https://registry.npmjs.org/commander
  npm http 304 https://registry.npmjs.org/options
  
  &gt; ws@0.4.25 install D:\dev\node-login\node_modules\socket.io\node_modules\socket
  .io-client\node_modules\ws
  &gt; (node-gyp rebuild 2&gt; builderror.log) || (exit 0)
  
  
  D:\dev\node-login\node_modules\socket.io\node_modules\socket.io-client\node_modu
  les\ws&gt;node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\no
  de_modules\node-gyp\bin\node-gyp.js" rebuild
    bufferutil.cc
  ..\src\bufferutil.cc(55): warning C4267: 'initializing' : conversion from 'size
  _t' to 'unsigned int', possible loss of data [D:\dev\node-login\node_modules\so
  cket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
  ..\src\bufferutil.cc(66): warning C4267: 'initializing' : conversion from 'size
  _t' to 'unsigned int', possible loss of data [D:\dev\node-login\node_modules\so
  cket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
  C:\Users\Vivaldi\.node-gyp\0.8.17\deps\v8\include\v8.h(183): warning C4506: no
  definition for inline function 'v8::Persistent&lt;T&gt; v8::Persistent&lt;T&gt;::New(v8::Ha
  ndle&lt;T&gt;)' [D:\dev\node-login\node_modules\socket.io\node_modules\socket.io-clie
  nt\node_modules\ws\build\bufferutil.vcxproj]
            with
            [
                T=v8::Object
            ]
       Creating library D:\dev\node-login\node_modules\socket.io\node_modules\soc
    ket.io-client\node_modules\ws\build\Release\bufferutil.lib and object D:\dev\
    node-login\node_modules\socket.io\node_modules\socket.io-client\node_modules\
    ws\build\Release\bufferutil.exp
    Generating code
    Finished generating code
    bufferutil.vcxproj -&gt; D:\dev\node-login\node_modules\socket.io\node_modules\s
    ocket.io-client\node_modules\ws\build\Release\\bufferutil.node
    validation.cc
  C:\Users\Vivaldi\.node-gyp\0.8.17\deps\v8\include\v8.h(183): warning C4506: no
  definition for inline function 'v8::Persistent&lt;T&gt; v8::Persistent&lt;T&gt;::New(v8::Ha
  ndle&lt;T&gt;)' [D:\dev\node-login\node_modules\socket.io\node_modules\socket.io-clie
  nt\node_modules\ws\build\validation.vcxproj]
            with
            [
                T=v8::Object
            ]
       Creating library D:\dev\node-login\node_modules\socket.io\node_modules\soc
    ket.io-client\node_modules\ws\build\Release\validation.lib and object D:\dev\
    node-login\node_modules\socket.io\node_modules\socket.io-client\node_modules\
    ws\build\Release\validation.exp
    Generating code
    Finished generating code
    validation.vcxproj -&gt; D:\dev\node-login\node_modules\socket.io\node_modules\s
    ocket.io-client\node_modules\ws\build\Release\\validation.node
  socket.io@0.9.13 node_modules\socket.io
  +-- base64id@0.1.0
  +-- policyfile@0.0.4
  +-- redis@0.7.3
  +-- socket.io-client@0.9.11 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obf
  uscator@0.0.1, ws@0.4.25)
  
  D:\dev\node-login&gt;
  </code></pre>
  
  <p><strong>Why the client can't find socket.io.js?</strong></p>