ejs include doesn't work with subfolders
<p>I am using express and ejs to build a website:</p>

<pre><code>"dependencies": {
 "ejs": "^2.5.2",
 "express": "^4.14.0",
</code></pre>

<p>in my app.js I have defined ejs as template engine and the root of views:</p>

<pre><code>app.set('view engine', 'ejs'); // set view engine
app.set('views', 'app/views'); // set custom root for view engine
</code></pre>

<p>I then created my index.ejs file in which I included a partial from a subdirectory:
index.ejs</p>

<pre><code>  &lt;head&gt;&lt;% include ./partials/template/head %&gt;&lt;/head&gt;
</code></pre>

<p>folder structure:</p>

<pre><code>- views
  index.ejs
-- partials
-- -- template
      head.ejs
</code></pre>

<p>When a start the server, index is loaded without errors but without the head section.
If I change the include (pointing to a wrong location) the server fails to start highlighting the problem, so ejs is able to locate the head.ejs.
if I move head.ejs in the views directory the head is correctly loaded in the index.ejs.
So... I am a bit puzzled, it seems that in the subdirectory the file read but not loaded into the include.</p>

<p>After searching for around I tried using express-partials but it has not helped much.</p>

<p>Any clue?</p>

<p>Cheers, Giovanni</p>