Hello. I’m revisiting my Hugo files on an MacBook M1 and I’m seeing an error when running hugo server. I tried interpreting the error but I can’t seem to unravel this one.
What I’ve done:
reviewed other posts with similar sounding issues to no avail
took a look in (theme.toml, base.html, and single.html) to see if there were any typos or odd/missing characters
Here is the LINK to the directory where the theme lives (I’m trying to use the Berbera theme). If there is something I can try, that would be very appreciated!
The full error reads:
WARN 2022/08/21 18:14:25 Failed to read module config for "berbera" in "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/theme.toml": "_stream.toml:12:8": unmarshal failed: toml: expected character ]
Start building sites …
hugo v0.101.0+extended darwin/arm64 BuildDate=unknown
ERROR 2022/08/21 18:14:25 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: page/single.html:16:7: executing "page/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:9": execute of template failed: template: partials/head-meta.html:19:9: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 18:14:25 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:9": execute of template failed: template: partials/head-meta.html:19:9: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 18:14:25 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:9": execute of template failed: template: partials/head-meta.html:19:9: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 18:14:25 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:9": execute of template failed: template: partials/head-meta.html:19:9: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:9": execute of template failed: template: partials/head-meta.html:19:9: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
The error I’m getting when running hugo server is:
WARN 2022/08/21 19:01:19 Failed to read module config for "berbera" in "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/theme.toml": "_stream.toml:12:8": unmarshal failed: toml: expected character ]
Start building sites …
hugo v0.101.0+extended darwin/arm64 BuildDate=unknown
ERROR 2022/08/21 19:01:19 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:28": execute of template failed: template: partials/head-meta.html:19:28: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 19:01:19 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:28": execute of template failed: template: partials/head-meta.html:19:28: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 19:01:19 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:28": execute of template failed: template: partials/head-meta.html:19:28: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/08/21 19:01:19 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: non-technical_note/single.html:16:7: executing "non-technical_note/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:28": execute of template failed: template: partials/head-meta.html:19:28: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:16:7": execute of template failed: template: page/single.html:16:7: executing "page/single.html" at <partial "head-meta.html" .>: error calling partial: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/partials/head-meta.html:19:28": execute of template failed: template: partials/head-meta.html:19:28: executing "partials/head-meta.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
I just reinstalled Hugo on this laptop so I may have a newer version of it (not sure if that’s contributing in some way). I’m happy to try more things if there are thoughts.
ah, thanks. Unfortunately, I still see an error pop up for me.
Now, I’m trying to understand the error a bit better and staring at these pieces:
_default/baseof.html:34:24
non-technical_note/single.html:34:24
Full Error:
WARN 2022/08/21 19:20:14 Failed to read module config for "berbera" in "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/theme.toml": "_stream.toml:12:8": unmarshal failed: toml: expected character ]
Start building sites …
hugo v0.101.0+extended darwin/arm64 BuildDate=unknown
ERROR 2022/08/21 19:20:15 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:34:24": execute of template failed: template: non-technical_note/single.html:34:24: executing "non-technical_note/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2022/08/21 19:20:15 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:34:24": execute of template failed: template: non-technical_note/single.html:34:24: executing "non-technical_note/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2022/08/21 19:20:15 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:34:24": execute of template failed: template: non-technical_note/single.html:34:24: executing "non-technical_note/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2022/08/21 19:20:15 render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:34:24": execute of template failed: template: non-technical_note/single.html:34:24: executing "non-technical_note/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "page" failed: "/Users/ericpena/Documents/Website/pena-notes/themes/berbera/layouts/_default/baseof.html:34:24": execute of template failed: template: page/single.html:34:24: executing "page/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
This is line 34 from _default/baseof.html:
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }} All Notes And Articles" />
I appreciate the help @tut! I ended up surrendering and just removing the RSS stuff altogether, I wasn’t using it anyhow. Another error popped up in my 404.html file but I also just removed that line.
Update: Now it works! Thanks for your time and very quick replies:]