title: node express module throwing 'has no method urlencoded' error
body: <pre><code>var express=require('express')
  var app=express();
  
  console.log("Encoded ",express.urlencoded());
  
  app.use(express.urlencoded());
  </code></pre>
  
  <p>The above code throws the following error :</p>
  
  <pre><code>[user@localhost nodejs]$ node program.js
  
  /home/user/Desktop/nodejs/program.js:41
  console.log("Encoded ",express.urlencoded());
                                 ^
  TypeError: Object function createApplication() {
    var app = function(req, res, next) {
      app.handle(req, res, next);
    };
  
    mixin(app, proto);
    mixin(app, EventEmitter.prototype);
  
    app.request = { __proto__: req, app: app };
    app.response = { __proto__: res, app: app };
    app.init();
    return app;
  } has no method 'urlencoded'
      at Object.&lt;anonymous&gt; (/home/user/Desktop/nodejs/program.js:41:32)
      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:902:3
  </code></pre>
  
  <p>Seems like a similar question here - <a href="https://stackoverflow.com/questions/11660879/express-js-trouble-with-connect-modules">express.js trouble with connect modules</a> but I'm already having express3.0.0 checked using the suggestion listed here - <a href="https://stackoverflow.com/questions/10972176/find-the-version-of-an-installed-npm-package">Find the version of an installed npm package</a></p>
  
  <p>I also read the Api docs here - <a href="http://expressjs.com/api.html" rel="nofollow noreferrer">http://expressjs.com/api.html</a> and they list <code>urlencoded()</code></p>
  
  <p>Please help.</p>
  
  <p>I would also like to point, that I also tried using <code>bodyParser()</code> but that too gave the same error of <code>has no method</code></p>