I have a personal website which uses the Hugo Academic theme. I have been using it for a long time without any issues but when I attempted to push an update today the deployment failed with this error:
Run hugo --minify
hugo: downloading modules …
hugo: collected modules in 2559 ms
Start building sites …
hugo v0.126.1-3d40aba512931031921463dafc172c0d124437b8+extended linux/amd64 BuildDate=2024-05-15T10:42:34Z VendorInfo=gohugoio
WARN deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.GoogleAnalytics.ID instead.
ERROR render of "page" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5@v5.0.0-20220307125723-f79d02251851/layouts/_default/baseof.html:9:403": execute of template failed: template: event/single.html:9:403: executing "event/single.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "section" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5@v5.0.0-20220307125723-f79d02251851/layouts/_default/baseof.html:9:403": execute of template failed: template: section/post.html:9:403: executing "section/post.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "section" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5@v5.0.0-20220307125723-f79d02251851/layouts/_default/baseof.html:9:403": execute of template failed: template: section/publication.html:9:403: executing "section/publication.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Total in 2971 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5@v5.0.0-20220307125723-f79d02251851/layouts/_default/baseof.html:9:403": execute of template failed: template: section/event.html:9:403: executing "section/event.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Error: Process completed with exit code 1.
I can’t find anything about this error online and don’t really understand what it’s saying. What does it mean that it can’t evaluate *source.File?
Any ideas how I can fix this?