title: Express 4.0: Cannot find module 'html' & Cannot find module 'handlebars'
body: <p>For the past hour or so I've been trying to figure out why I keep getting the following error when starting an Express 4.0 application:</p>
  
  <pre><code>Error: Cannot find module 'html'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at new View (e:\Multivision\node_modules\express\lib\view.js:43:49)
      at Function.app.render (e:\Multivision\node_modules\express\lib\application.
  js:499:12)
      at ServerResponse.res.render (e:\Multivision\node_modules\express\lib\respon
  se.js:955:7)
      at e:\Multivision\server.js:11:6
      at Layer.handle [as handle_request] (e:\Multivision\node_modules\express\lib
  \router\layer.js:76:5)
      at next (e:\Multivision\node_modules\express\lib\router\route.js:100:13)
  </code></pre>
  
  <p>Basically, I just want to use plain html files for my views, as I am experimenting with the MEAN stack. Below you can find two different versions of the <code>app.js</code> code that I am trying to run:</p>
  
  <p><strong>VERSION 1</strong></p>
  
  <pre><code>var express = require('express'),
      app = express();
  
  var env = process.env.NODE_ENV = process.env.NODE_ENV || 'development',
      port = 3000;
  
  app.set('views', __dirname + '/server/views');
  app.set('view engine', 'html');
  
  app.get('*', function(req, res) {
      res.render('index');
  });
  
  app.listen(port);
  console.log('Listening on port ' + port + '...');
  </code></pre>
  
  <p><strong>VERSION 2</strong></p>
  
  <pre><code>var express = require('express'),
      app = express();
  
  var env = process.env.NODE_ENV = process.env.NODE_ENV || 'development',
      port = 3000;
  
  app.set('views', __dirname + '/server/views');
  app.engine('html', require('consolidate').handlebars);
  app.set('view engine', 'html');
  
  app.get('*', function(req, res) {
      res.render('index');
  });
  
  app.listen(port);
  console.log('Listening on port ' + port + '...');
  </code></pre>
  
  <p>When running <strong>VERSION 2</strong> of the code, I get the following eror:</p>
  
  <pre><code>Error: Cannot find module 'handlebars'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Function.exports.handlebars.render (e:\Multivision\node_modules\consolida
  te\lib\consolidate.js:488:62)
      at e:\Multivision\node_modules\consolidate\lib\consolidate.js:146:25
      at e:\Multivision\node_modules\consolidate\lib\consolidate.js:99:5
      at fs.js:266:14
      at Object.oncomplete (fs.js:107:15)
  </code></pre>
  
  <p><strong>VIEW (INDEX.HTML)</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Test Application&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Hello World!&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have already looked at the other questions on this topic on StackOverflow, but could not find a proper solution. I would really appreciate it if someone could point me in the right direction or, even better, explain why this is happening.</p>