Error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations

Suddenly my site failed on me, with a bunch of error messages that I don’t understand.
First off some images were lacking from Images folder, issue I may not the cause of but it’s solved now, at least when it comes markdown images (I can’t tell from stuff from inside html). There’s a book.scss, favicon.ico, plugins/_numbered.scss.
What kind of resource might be lacking ?

errors
Start building sites … 
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
ERROR 2023/02/06 02:16:23 render of "page" failed: "/home/drm/WEBSITE/themes/hugo-book/layouts/_default/baseof.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "docs/html-head" .>: error calling partial: "/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58": execute of template failed: template: partials/docs/html-head.html:19:58: executing "partials/docs/html-head.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
ERROR 2023/02/06 02:16:23 render of "page" failed: "/home/drm/WEBSITE/themes/hugo-book/layouts/_default/baseof.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "docs/html-head" .>: error calling partial: "/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58": execute of template failed: template: partials/docs/html-head.html:19:58: executing "partials/docs/html-head.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
ERROR 2023/02/06 02:16:23 render of "page" failed: "/home/drm/WEBSITE/themes/hugo-book/layouts/_default/baseof.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "docs/html-head" .>: error calling partial: "/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58": execute of template failed: template: partials/docs/html-head.html:19:58: executing "partials/docs/html-head.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
ERROR 2023/02/06 02:16:23 render of "page" failed: "/home/drm/WEBSITE/themes/hugo-book/layouts/_default/baseof.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "docs/html-head" .>: error calling partial: "/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58": execute of template failed: template: partials/docs/html-head.html:19:58: executing "partials/docs/html-head.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
Error: Error building site: failed to render pages: render of "page" failed: "/home/drm/WEBSITE/themes/hugo-book/layouts/_default/baseof.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "docs/html-head" .>: error calling partial: "/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58": execute of template failed: template: partials/docs/html-head.html:19:58: executing "partials/docs/html-head.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
Built in 114 ms
script I use to generate the site
#!/usr/bin/fish
cd /home/drm/WEBSITE/
killall hugo -KILL;
if test -e assets/
    rm assets/ -r
end
mkdir -p assets/Images/
cp -rs ~/Images/ -t assets/
if not test -e static/Images
    mkdir static/Images
end;
cp -r ~/Images/static/* -t static/Images/
if not test -e static/Images/banners/done
    gm mogrify -resize 'x200>' static/Images/banners/*;
    touch static/Images/banners/done;
end
rm assets/Images/static -r;
setsid -f firefox "http://localhost:1313/" &;
hugo server --gc --minify --cleanDestinationDir
html-head-html
<!--<script async src="https://www.googletagmanager.com/gtag/js?id=G-SCK9DGEMV0"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-SCK9DGEMV0');
</script>-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#FFFFFF">
<meta name="author" content="Mehdi Saada">
<meta name="color-scheme" content="light dark">
{{- with .Page.Params.BookHref -}}
  <meta http-equiv="Refresh" content="0; url='{{ . }}'" />
{{- end -}}

<title>{{ partial "docs/html-head-title" .}}</title>
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
<link rel="icon" href="{{ "favicon.ico" | relURL }}" type="image/x-icon">
{{- range .Translations }}
  <link rel="alternate" hreflang="{{ default .Language.Lang site.LanguageCode }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
{{- end -}}
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
{{- $numbered := resources.Get "plugins/_numbered.scss" | resources.ExecuteAsTemplate "numbered.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ template "integrity" $styles }}>
{{- if default true site.Params.BookSearch -}}
  {{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
  {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
  <script defer src="{{ "flexsearch.min.js" | relURL }}"></script>
  <script defer src="{{ $searchJS.RelPermalink }}" {{ template "integrity" $searchJS }}></script>
{{ end -}}
{{- if site.Params.BookServiceWorker -}}
  {{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
  <script defer src="{{ $swJS.RelPermalink }}" {{ template "integrity" $swJS }}></script>
{{ end -}}
<!-- RSS -->
{{- with .OutputFormats.Get "rss" -}}
  {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end -}}
{{ "<!--" | safeHTML }}
Made with Book Theme
https://github.com/alex-shpak/hugo-book
{{ "-->" | safeHTML }}
{{- define "integrity" -}}
  {{- if (urls.Parse .Permalink).Host -}}
    integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
  {{- end -}}
{{- end -}}
head.html
<meta name="keywords" content="{{ default site.Params.Keywords .Params.Keywords}}">
<meta name="description" content="{{ default site.Params.description .Params.description}}">
{{ if isset .Params "date" }}
<meta property="article:published_time" content="{{ (time .Date).Format "2006-01-02 15:04:05" }}">
{{ end }}
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}
{{- template "_internal/google_analytics.html" . -}}
{{with .Params.Parent}}<link rel="up" href="{{(site.GetPage .).RelPermalink}}">{{end}}

{{if not .Params.NoHierarchy}}
<link rel="next" href="{{with .PrevInSection}}{{.RelPermalink}}
{{ else }}
{{ with .Params.Next }}
{{(site.GetPage .).RelPermalink}}
{{ end }}{{ end }}">

<link rel="prev" href="{{ with .NextInSection }}{{ .RelPermalink }}{{ else }}{{ with .Params.Prev }}
{{(site.GetPage .).RelPermalink}}
{{ end }}
{{ end }}">
{{end}}

<link rel="preload" as="image" type="image/webp" href="/Images/history/favicons/symbole_nazi_perso_deux_arbres.webp">
<link rel="preload" as="image" type="image/webp" href="/Images/wallpaper/space/messier78bis-reduced.webp">
{{if .IsHome}}
<link rel="preload" as="font" href="/fonts/norse.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="/fonts/norse-bold.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="image" imagesrcset="/Images/spirituality/mythology/modern/warcraft/new_cover_warcraft_hue1da11df08ad4ace5b3ba148baef5363_411026_200x0_resize_q75_h2_box_2.webp 200w, /Images/spirituality/mythology/modern/warcraft/new_cover_warcraft_hue1da11df08ad4ace5b3ba148baef5363_411026_549x707_resize_q75_h2_box_2.webp 600w, /Images/spirituality/mythology/modern/warcraft/new_cover_warcraft.webp 1000w, /Images/spirituality/mythology/modern/warcraft/new_cover_warcraft.webp 1540w">
{{end}}
<link rel="preload" as="font" href="/fonts/roboto-regular.woff2" type="font/woff2" crossorigin>
{{if not .IsHome}}
<link rel="preload" as="font" href="/fonts/roboto-italic.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="/fonts/roboto-bolditalic.ttf" type="font/ttf" crossorigin>
{{end}}
<link rel="preload" as="font" href="/fonts/roboto-bold.woff2"type="font/woff2"  crossorigin>
{{ end }}
directory tree

/home/drm/WEBSITE
├──􀀂 assets
│ └──􀀂 Images
│ ├──􀀂 biology …
│ ├──🔗 gay_meme_Z_generation.jpg → /home/drm/Images/gay_meme_Z_generation.jpg
│ └──􀀂 13 unlisted
├──􀌜 config.toml
├──􀀂 content
│ ├──􀇱 _index.md
│ └──􀀂 docs
│ ├──􀇱 _index.md
│ ├──􀀂 Autres_cachés …
│ └──􀇱 6 unlisted
├──􀆄 package-lock.json
├──􀆄 package.json
├──􀀂 resources
│ └──􀀂 _gen
│ ├──􀀂 assets …
│ └──􀀂 images …
├──􀀂 static
│ └──􀀂 Images
│ ├──􀀂 banners …
│ ├──􀀂 history …
│ └──􀀂 wallpaper …
└──􀀂 themes
└──􀀂 hugo-book
├──􀀂 archetypes …
├──􀀂 assets …
└──􀀀 8 unlisted

error calling partial: “/home/drm/WEBSITE/themes/hugo-book/layouts/partials/docs/html-head.html:19:58”

Line 19:

Hugo throws ERROR because the resource is <nil>, make sure manifest.json exists.

1 Like

I see, I had run fdupes and it removes a few files everywhere I had not intended to.
Corrected.

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