I updated the hugo theme I use (hugoplate), and rebuilt, and I’m getting these errors locally. Can’t figure out what’s going wrong. Mainly two classes of errors: failed to render pages, and execute of template failed.
Any idea what may be wrong?
Error: error building site: render: failed to render pages: render of “section” failed: “/Users/skiyer/Website/sriiyer/layouts/authors/list.html:10:15”: execute of template failed: template: authors/list.html:10:15: executing “main” at <partial “components/author-card” .>: error calling partial: “/var/folders/gz/fqybhb3d747325ktkjss097r0000gn/T/hugo_cache_skiyer/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20230731041653-56544f9e8606/layouts/partials/components/author-card.html:5:7”: execute of template failed: template: partials/components/author-card.html:5:7: executing “partials/components/author-card.html” at <partial “image” (dict “Src” $image “Alt” .Title “Class” “mx-auto mb-6 rounded” “size” “120x120”)>: error calling partial: “/var/folders/gz/fqybhb3d747325ktkjss097r0000gn/T/hugo_cache_skiyer/modules/filecache/modules/pkg/mod/github.com/gethugothemes/hugo-modules/images@v0.0.0-20230731033118-be0c1c964f76/layouts/partials/image.html:173:43”: execute of template failed: template: partials/image.html:173:43: executing “partials/image.html” at <$imageWebp.Resize>: error calling Resize: image “/Users/skiyer/Website/sriiyer/assets/images/avatar.png”: resize avatar_hu2fb2c1ffbbc34375e1753f29fe535e66_2271_194x194_resize_q90_h2_lanczos_3.webp: image: unknown format
You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.
See Requesting Help.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
1 Like
Thanks. The source is here: GitHub - iamsridhar/sriiyer: my personal website
I only see the error when I build locally. The Netlify build is successful.
Here’s what I did:
git clone --recurse-submodules https://github.com/iamsridhar/sriiyer
cd sriiyer/
npm install
hugo
Here’s what I got:
hugo: downloading modules …
hugo: collected modules in 4014 ms
Start building sites …
hugo v0.116.1-3e1ea030a5897addaf9d113d0826709fe07f77c0+extended linux/amd64 BuildDate=2023-08-01T07:24:54Z VendorInfo=gohugoio
| EN
-------------------+-----
Pages | 38
Paginator pages | 0
Non-page files | 0
Static files | 8
Processed images | 86
Aliases | 1
Sitemaps | 1
Cleaned | 0
Total in 14973 ms
Which version of Hugo are you running locally? At Netlify?
WebP supported was added a couple of years ago, v0.83.0. Current version is v0.116.1.
Locally, I’m running hugo v0.115.4+extended. Upgraded my local version to v0.116.1, but am running into the same error. On Netlify, I have HUGO_VERSION set to 0.115.4
I wiped my local repository clean and set it up again, and it works now. Thanks for helping out; I am not sure what was wrong before, since I had no other local changes other than updating the theme (git submodule update --remote)