title: Error: Could not find the include file "partials/head"
body: <p><a href="https://i.stack.imgur.com/Gog14.png" rel="nofollow noreferrer">enter image description here</a>I am trying to run an ejs file and gets error Error: Could not find the include file "partials/head". </p>
  
  <p>i have checked most of the articles from stackoverflow and github however not able to resolve it ...</p>
  
  <blockquote>
    <p>Error: Could not find the include file "partials/head"
        at getIncludePath (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:162:13) enter
    code here    at includeSource
    (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:306:17)
        at C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:672:26
        at Array.forEach ()
        at Template.generateSource (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:648:15)
        at Template.compile (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:552:12)
        at Object.compile (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:388:16)
        at handleCache (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:212:18)
        at tryHandleCache (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:251:16)
        at View.exports.renderFile [as engine] (C:\Users\Junia\Desktop\node\node_modules\ejs\lib\ejs.js:480:10)</p>
  </blockquote>
  
  <pre><code>var express=require('express');
  
  var app=express();
  
  var router=express.Router();
  
  var mysql=require('mysql');
  
  var cookieParser=require('cookie-parser');
  
  var session=require('express-session');
  
  app.use(session({
      secret: 'secret',
      resave: true,
      saveUninitialized: true
      //cookie : { maxAge : 60000 }
  }));
  
  var path=require('path');
  
  var bodyParser=require('body-parser');
  
  app.use(express.static('/'));
  
  //Serves all the request which includes /images in the url from Images folder
  
  app.use('/images', express.static(__dirname + '/images'));
  
  app.use('/bs4', express.static(__dirname + '/bs4'));
  
  app.use(cookieParser());
  
  const ejsLint = require('ejs-lint');
  
  var con=mysql.createConnection(
  
  {
  
  host:'localhost',
  
  user:'root',
  
  password:'',
  
  database:'shintoj'
  
  });
  
  var path = require('path');
  
  app.use('/',router);
  
  app.use('/',express.static(__dirname + '/'));
  
  app.set('views', path.join(__dirname, 'views/pages'));
  
  app.set('view engine', 'ejs');// use res.render to load up an ejs view file
  
  // index page 
  
  router.get('/', function(req, res) {
  
      //res.send('Welcome');
  
      res.render('index');
  
  });
  
  app.listen(8080);
  
  console.log('8080 is the magic port');
  
  console.log(app.get('views'));
  </code></pre>
  
  <p>index.ejs file </p>
  
  <pre><code>&lt;head&gt;
  
  &lt;%- include partials/head %&gt;
  
  &lt;/head&gt;
  
  &lt;body class="container"&gt;
  
  &lt;header&gt;
  
  &lt;% include partials/header.ejs %&gt;
  
  &lt;/header&gt;
  
      &lt;div class="jumbotron"&gt;
  
          &lt;h2&gt;Welcome to our services .&lt;/h2&gt;
  
          &lt;p&gt;Hello&lt;/p&gt;
  
      &lt;/div&gt;
  
  &lt;footer&gt;
  
  &lt;% include partials/footer.ejs %&gt;
  
  &lt;/footer&gt;   
  </code></pre>
  
  <p>expected actual result is ..
  when i run node server.js , it should display the index.ejs file </p>