Render failed after brew upgrade hugo 0.124.1 -> 0.126.1

After running brew upgrade my site won’t render anymore. This is quite over my head, what would you advise me to do?

This is what hugo server returns:

> ERROR render of "section" failed: "/Users/rico/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.7.1/layouts/blog/baseof.html:4:7": execute of template failed: template: blog/list.html:4:7: executing "blog/list.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"
> ERROR render of "page" failed: "/Users/rico/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.7.1/layouts/blog/baseof.html:4:7": execute of template failed: template: blog/single.html:4:7: executing "blog/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"
> Built in 157 ms
> Error: error building site: render: failed to render pages: render of "404" failed: "/Users/rico/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.7.1/layouts/_default/baseof.html:4:7": execute of template failed: template: 404.html:4:7: executing "404.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"

You need to update your your theme (and talk to the theme author google/docsy · Discussions · GitHub)

1 Like

Thanks.

Updated the theme as per @Arif 's suggestion.

This reduces the error messages to:

Error: error copying static files: open /Users/rico/Documents/GitHub/canvasmethod-site/public/js/tabpane-persist.js: permission denied

Over at Docsy the current opinion is that this is not an error with docsy theme.
Running hugo server --noChmod --noTimes didn’t help.

Out of curiosity, have you tried deleting the public directory before building the site?

Do you have read permissions on the source file?

Seleting the public directory solved the problem, thank you.

Would you advise to always remove the public directory before building the site?
Is there a flag for the hugo server command that accomplishes this?

No.

But you should delete it if you mark content as draft, set a future publishing date, or set a past expiration date.

Thank you

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.