title: Failed to lookup view, correct filename and location
body: <p>I was following instructions from here: <a href="https://scotch.io/tutorials/easy-node-authentication-setup-and-local" rel="nofollow">https://scotch.io/tutorials/easy-node-authentication-setup-and-local</a>, when i got this error when trying to run my code, <br/></p>
  
  <p><code>Error: Failed to lookup view "index.ejs" in views directory "Directory/views"</code><br/></p>
  
  <pre><code>at EventEmitter.render (Directory/node_modules/express/lib/application.js:579:17)
  at ServerResponse.render (Directory/node_modules/express/lib/response.js:961:7)
  at Directory/ourMeanJS/config/routes.js:10:13
  at Layer.handle [as handle_request] (Directory/node_modules/express/lib/router/layer.js:95:5)
  at next (Directory/node_modules/express/lib/router/route.js:131:13)
  at Route.dispatch (Directory/node_modules/express/lib/router/route.js:112:3)
  at Layer.handle [as handle_request] (Directory/node_modules/express/lib/router/layer.js:95:5)
  at Directory/node_modules/express/lib/router/index.js:277:22
  at Function.process_params (Directory/node_modules/express/lib/router/index.js:330:12)
  at next (Directory/node_modules/express/lib/router/index.js:271:10)
  at Directory/node_modules/connect-flash/lib/flash.js:21:5
  at Layer.handle [as handle_request] (Directory/node_modules/express/lib/router/layer.js:95:5)
  at trim_prefix (Directory/node_modules/express/lib/router/index.js:312:13)
  at Directory/node_modules/express/lib/router/index.js:280:7
  at Function.process_params (Directory/node_modules/express/lib/router/index.js:330:12)
  at next (Directory/node_modules/express/lib/router/index.js:271:10) 
  </code></pre>
  
  <p>here is my route setup:</p>
  
  <pre><code>module.exports = function(app, passport) {
  
  // =====================================
  // HOME PAGE (with login links) ========
  // =====================================
  app.get('/', function(req, res) {
      res.render('index.ejs'); // load the index.ejs file
  });
  </code></pre>
  
  <p>here is some of my server.js:</p>
  
  <pre><code>app.set('view engine', 'ejs'); // set up ejs for templating
  require('./config/routes.js')(app, passport);
  </code></pre>
  
  <p>my views are in Directory/views and i have a view called index.ejs. anyone have a clue as to what is going wrong?</p>
  
  <p>*edit just realized that this route works, don't know if it is a clue</p>
  
  <pre><code>app.get('/signup', function(req, res) {
  
      // render the page and pass in any flash data if it exists
      res.render('signup.ejs', { message: req.flash('signupMessage')});
  });
  </code></pre>