Website deployment suddenly failed

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?

You are more likely to receive an accurate and timely response from the Academic/Wowchemy/Hugo Blox team:
https://github.com/HugoBlox/hugo-blox-builder/discussions

They also have an active Discord channel:
https://discord.com/invite/z8wNYzb

cc: @alcarazr

That error is fixed in the latest versions of Hugo Blox. Update your theme.

1 Like

I tried to update the go.mod file using this version from the public repo but got this error:


Run hugo --minify

go: downloading go1.22 (linux/amd64)

go: download go1.22 for linux/amd64: toolchain not available

Total in 260 ms

Error: failed to load modules: failed to download modules: failed to execute 'go [mod download -modcacherw]': failed to execute binary "go" with args [mod download -modcacherw]: go: downloading go1.22 (linux/amd64)

go: download go1.22 for linux/amd64: toolchain not available

*errors.errorString

Error: Process completed with exit code 1.

Which version of go is installed on your system?

I’m not running it locally. This is all being built on Github

Repository?

I can get past the build chain errors by changing 1.22 in the go.mod file to 1.22.0, but then the build fails due to missing shortcodes such as “staticref”.

Please continue the discussion here:
https://github.com/HugoBlox/hugo-blox-builder/discussions/3101

Or use their Discord channel:
https://discord.com/invite/z8wNYzb

This is a bit of a mess.