title: nodejs connect cannot find static
body: <p>NOTE: I have tried other solution given <a href="https://stackoverflow.com/questions/23978734/node-connect-issue-object-function-createserver-has-no-method-static">here</a> but it didn't work</p>
  
  <p>A newbie with NodeJs. I am trying to follow AngularJS pro and got stuck with setting up NodeJs server. According to book, I installed nodejs and then installed connect package using
  npm install connect</p>
  
  <p>then downloaded angularjs in folder next to nodejs folder. Then wrote server.js file to connect to server. Here is the content of the file:</p>
  
  <pre><code>    var connect = require('connect');
  connect.createServer(connect.static("../angularjs")).listen( 5000);
  </code></pre>
  
  <p>When I run this server.js file using: </p>
  
  <pre><code>node server.js
  </code></pre>
  
  <p>I get following error:</p>
  
  <pre><code> function app(req, res, next){ app.handle(req, res, next); }
   merge(app, proto);
   merge(app, EventEmitter.prototype);
   app.route = '/';
   app.stack = [];
   return app;
   has no method 'static'
     at Object.&lt;anonymous&gt; (C:\web\nodejs\server.js:2:36)
     at Module._compile (module.js:456:26)
     at Object.Module._extensions..js (module.js:474:10)
     at Module.load (module.js:356:32)
     at Function.Module._load (module.js:312:12)
     at Function.Module.runMain (module.js:497:10)
     at startup (node.js:119:16)
     at node.js:906:3
  </code></pre>
  
  <p>Any ideas guys?
  Thanks.</p>