title: Uncaught TypeError: Object #<Object> has no method 'connect'
body: <p>So I did <code>npm install express</code> and <code>npm install socket.io</code> and I brought the <code>node_modules</code> folders to my <code>server</code> folder where I am using <code>WAMP</code>.</p>
  
  <p>Using this as <code>server.js</code>:</p>
  
  <pre><code>var app = require('express').createServer();
  var io = require('socket.io').listen(app);
  
  io.sockets.on('connection', function (socket) {
  console.log('Someone connected!');
  socket.on('set nickname' , function (nickname) {
  socket.nickname = nickname;
  console.log(nickname + ' just connected!');
  });
  
  });
  
  app.listen(8080);
  </code></pre>
  
  <p>and using this as <code>client.html</code></p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
  &lt;head&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt;
      &lt;title&gt;Untitled 4&lt;/title&gt;
  &lt;script src="http://cdn.socket.io/stable/socket.io.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    var socket = io.connect('http://localhost:8080');
    socket.on('connect', function () {
      console.log('We are connected!');
  var name = prompt('What is your name?');
  this.emit('set namename', name, function (success) {
  console.log('The server got the message!');
  
  if (!success) {
  console.log('Nickname is in use!');
  }
  });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the error I get is <code>Uncaught TypeError: Object #&lt;Object&gt; has no method 'connect'</code></p>
  
  <p>I know I used a different than <code>socket.io.js</code> becase I don't know where to get the <code>/socket.io/socket.io.js</code>. I tried doing <code>node_modules/socket.io/lib/socket.io.js</code> which is another one I found i my <code>node_modules</code> folder, but that isn't it.</p>
  
  <p>I also started my <code>server</code> and I got <code>socket.io started</code> so I know that works.</p>