Error calling minify: expected resources.ResourceTransformer; got resource.Resource

Hello, I need help with a HUGO error message:

 > [hugo-build 5/5] RUN hugo --minify --debug :
0.283 DEBUG 2025/01/08 15:47:57 Render page index to "/index.html"
0.284 DEBUG 2025/01/08 15:47:57 Render page Categories to "/categories/index.html"
0.284 DEBUG 2025/01/08 15:47:57 Render page Pages to "/pages/index.html"
0.285 DEBUG 2025/01/08 15:47:57 Render page Tags to "/tags/index.html"

0.286 ERROR 2025/01/08 15:47:57 render of "page" failed: "/tmp/build/themes/edi/layouts/_default/single.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/tmp/build/themes/edi/layouts/partials/head.html:28:36": execute of template failed: template: partials/head.html:28:36: executing "partials/head.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource

0.286 ERROR 2025/01/08 15:47:57 render of "page" failed: "/tmp/build/themes/edi/layouts/_default/single.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/tmp/build/themes/edi/layouts/partials/head.html:28:36": execute of template failed: template: partials/head.html:28:36: executing "partials/head.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource
0.286 ERROR 2025/01/08 15:47:57 render of "page" failed: "/tmp/build/themes/edi/layouts/_default/single.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/tmp/build/themes/edi/layouts/partials/head.html:28:36": execute of template failed: template: partials/head.html:28:36: executing "partials/head.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource
0.287 ERROR 2025/01/08 15:47:57 render of "page" failed: "/tmp/build/themes/edi/layouts/_default/single.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/tmp/build/themes/edi/layouts/partials/head.html:28:36": execute of template failed: template: partials/head.html:28:36: executing "partials/head.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource
0.295 Error: Error building site: failed to render pages: render of "page" failed: "/tmp/build/themes/edi/layouts/_default/single.html:4:3": execute of template failed: template: _default/single.html:4:3: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/tmp/build/themes/edi/layouts/partials/head.html:28:36": execute of template failed: template: partials/head.html:28:36: executing "partials/head.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource
0.295 Total in 79 ms
------
Dockerfile:25
--------------------
  23 |     
  24 |     WORKDIR /tmp/build
  25 | >>> RUN hugo $hugo_args
  26 |     
  27 |     ###############################################################################
--------------------
ERROR: failed to solve: process "/bin/sh -c hugo $hugo_args" did not complete successfully: exit code: 255
task: Failed to run task "deploy-dev": exit status 1
Error: Process completed with exit code 201.



--> I don't know what I can do about it

\GitHub\edi-webpage\src\hugo
\GitHub\edi-webpage\src\hugo\themes\edi\layouts
\GitHub\edi-webpage\src\hugo\themes\edi\layouts\partials\head.html

\GitHub\edi-webpage\src\hugo\themes\edi\assets
\GitHub\edi-webpage\src\hugo\themes\edi\assets\css\main.css

\GitHub\edi-webpage\src\hugo\themes\edi\assets\csv
\GitHub\edi-webpage\src\hugo\themes\edi\assets\csv\contactlist.csv

Dockerfile: klakegg/hugo:0.111.3 AS hugo-build

The first error message is telling you where to look and what to look for.

If you need additional assistance you’ll need to share your project’s Git repository.

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.