title: Express: Error: Failed to lookup view "index" in views directory
body: <p>I set my nodejs template engine over to ejs. When I run my app.js with my ejs template, I receive a error of &quot;Failed to lookup view 'error' in views&quot;</p>
  <pre><code>Error: Failed to lookup view &quot;index&quot; in views directory &quot;/home/runner/kaskusttv/views&quot;
      at Function.render (/home/runner/kaskusttv/node_modules/express/lib/application.js:580:17)
      at ServerResponse.render (/home/runner/kaskusttv/node_modules/express/lib/response.js:1012:7)
      at /home/runner/kaskusttv/app.js:72:6
      at Layer.handle [as handle_request] (/home/runner/kaskusttv/node_modules/express/lib/router/layer.js:95:5)
      at next (/home/runner/kaskusttv/node_modules/express/lib/router/route.js:137:13)
      at Route.dispatch (/home/runner/kaskusttv/node_modules/express/lib/router/route.js:112:3)
      at Layer.handle [as handle_request] (/home/runner/kaskusttv/node_modules/express/lib/router/layer.js:95:5)
      at /home/runner/kaskusttv/node_modules/express/lib/router/index.js:281:22
      at Function.process_params (/home/runner/kaskusttv/node_modules/express/lib/router/index.js:335:12)
      at next (/home/runner/kaskusttv/node_modules/express/lib/router/index.js:275:10)
      at compression (/home/runner/kaskusttv/node_modules/compression/index.js:220:5)
      at Layer.handle [as handle_request] (/home/runner/kaskusttv/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/runner/kaskusttv/node_modules/express/lib/router/index.js:317:13)
      at /home/runner/kaskusttv/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/home/runner/kaskusttv/node_modules/express/lib/router/index.js:335:12)
      at next (/home/runner/kaskusttv/node_modules/express/lib/router/index.js:275:10)
  </code></pre>
  <p>What is the proper place to get these to work in express? I used this to set the engine to ejs</p>
  <pre class="lang-js prettyprint-override"><code>app.set(&quot;views&quot;, path.join(__dirname, &quot;views&quot;));
  app.set(&quot;view engine&quot;, &quot;ejs&quot;);
  </code></pre>