title: Node.JS Consolidate and Swig
body: <p>I'm trying to setup Consolidate with node(express v3.1.0), to use Swig.  I keep getting the error </p>
  
  <blockquote>
    <p>Error: Cannot find module 'swig'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:362:17)
        at require (module.js:378:17)
        at Function.exports.swig.render (/home/jamie/node_modules/consolidate/lib/consolidate.js:237:50)
        at /home/jamie/node_modules/consolidate/lib/consolidate.js:144:25
        at /home/jamie/node_modules/consolidate/lib/consolidate.js:97:5
        at fs.readFile (fs.js:176:14)
        at Object.oncomplete (fs.js:297:15)</p>
  </blockquote>
  
  <p>At the top, I set it up like this</p>
  
  <pre><code>var express = require('express');
  var cons = require('consolidate');
  
  // assign the swig engine to .html files
  console.log(cons.swig);
  app.engine('html', cons.swig);
  
  // set .html as the default extension 
  app.set('view engine', 'html');
  app.set('views', __dirname + '/views');
  </code></pre>
  
  <p>then I make my request like this:</p>
  
  <pre><code>app.get('/', function(req, res){
      res.render('home', {
          title: "home"
      });
  });
  </code></pre>
  
  <p>I have a template, home.html,  in the root directory/views</p>
  
  <p>My root directory is /home/jamie/hello-world.  What am I doing wrong here?</p>
  
  <p><strong>Edit</strong>
  By the way, the console.log(cons.swig) does return something.</p>
  
  <pre><code>{ [Function] render: [Function] }
  </code></pre>
  
  <p>So its definitely <em>there</em></p>