title: Twig_Error_Loader: Template is not defined - Drupal
body: <p>I created an <code>include</code> in Drupal: </p>
  
  <p><code>{% include directory ~ '/partials/header.html.twig' %}</code></p>
  
  <p>but I am getting this error:</p>
  
  <p><code>Twig_Error_Loader: Template "themes/custom/mytheme/partials/header.html.twig" is not defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find template "themes/custom/mytheme/partials/header.html.twig" in the Drupal theme registry.) in "themes/custom/mytheme/page--front.html.twig" at line 1. in Twig_Loader_Chain-&gt;getCacheKey() (line 115 of vendor/twig/twig/lib/Twig/Loader/Chain.php).</code></p>
  
  <p>According to Drupal and Twig documentation, I am doing it the right way.</p>
  
  <p>I have a directory called <code>partials</code> and a file called <code>header.html.twig</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/RduJU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RduJU.png" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong? I am running Drupal in MAMP and OSX, El Capitan. Drupal 8.3.7</p>