I know there are similar questions to this that have been asked but none of the solutions are working for me and I've been at this all day so I thought I'd give this a try.
I've created a sub-theme of Bartik for Drupal 9. I've copied the page.html.twig and I'm trying to include a templates/includes/footer.html.twig and nothing I have tried has worked.
I installed the components module and updated DB
Declared the following in subbartik.info.yml:
components:
namespaces:
includes: includes
Input the following into page.html.twig
{% include '@includes/footer.html.twig' %}
Cleared cache with drush, and I get error:
Twig\Error\LoaderError: Template "@includes/footer.html.twig" is not defined in "sites/default/themes/custom/subbartik/templates/page.html.twig" at line 125. in Twig\Loader\ChainLoader->getCacheKey()
I've tried a relative path from web folder root
{% include 'sites/default/themes/custom/subbartik/templates/includes/footer.html.twig' %}
Same error:
Twig\Error\LoaderError: Template "sites/default/themes/custom/subbartik/templates/includes/footer.html.twig" is not defined in "sites/default/themes/custom/subbartik/templates/page.html.twig"
I tried the old:
{% include '@subbartik/includes/footer.html.twig' %}
Same error:
Twig\Error\LoaderError: Template "@subbartik/includes/footer.html.twig" is not defined in "sites/default/themes/custom/subbartik/templates/page.html.twig"
Any suggestions would be appreciated. Thanks!
UPDATE
File structure (figured it would just be easier to take a screen shot):