W Y A T T F L E M I N G

Truth through experimentation

Hugo Server Error: found no layout file for 'HTML' for 'home'


Tags: Hugo

When trying to setup this new iteration of my personal website, using Hugo, I kept running into this error when trying to run the hugo server command:


WARN 2019/10/24 10:21:40 found no layout file for "HTML" for "home":
    You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

There were a few different discussions of the error, but after trying all of those potential fixes out, none of them solved the issue for me. After studying the error and prodding different changes by trial-and-error I ended up finding a fix and it ended up being such a basic solution I was a little embarassed I battled it for as long as I did: make sure you are in the root of your Hugo website folder when you run the hugo server command.

Meaning when you want to run hugo server make sure you are doing so in C:\WINDOWS\system32\%USERPROFILE%\src\hugo\wyatt-fleming rather than C:\WINDOWS\system32\%USERPROFILE%\src\hugo\wyatt-fleming\static or C:\WINDOWS\system32\%USERPROFILE%\src\hugo\wyatt-fleming\layouts or any other directory that is not the root directory of your Hugo website.

My name is Wyatt Fleming. I am a Project Manager at WebJaguar and a life-long learner interested in history, economics, gardening, and computers.