Hugo: Failed to load templates

I’m getting the following error running Hugo now. This was working fine before, so I’m not really sure what changed. There were some Windows Updates the other night so maybe something broke. I updated to the latest Hugo via the choco upgrade command.

It seems to work fine still on the Mac.

See below for the error:

PS C:\Users\tyler\OneDrive\TRBlog> hugo
e[?25lBuilding sites … ERROR 2018/04/12 21:23:26 Failed to load templates: Cannot walk regular file C:\Users\tyler\OneDrive\TRBlog\themes\kiss2/layouts
e[KTotal in 13 ms
Error: Error copying static files: open C:\Users\tyler\OneDrive\TRBlog\public: is a directory
PS C:\Users\tyler\OneDrive\TRBlog> hugo env
Hugo Static Site Generator v0.38 windows/amd64 BuildDate: 2018-04-02T11:04:06Z
PS C:\Users\tyler\OneDrive\TRBlog>

Mac user here, and this is anecdotal, but I’ve seen problems before due to putting files in a folder that is synced to the cloud. Can I presume your OneDrive folder is being synced? Maybe try temporarily moving the files to a non-synced folder?

Yep it looks like that is the culprit.

Thank you.

1 Like