Error rebuilding a site that previously built successfully

I’m trying to rebuild a site that I last built successfully on Jan 8 2025, but I cannot get it to build now. I’m using the same revision from git and using the same version - hugo v0.132.1+extended. I run this version on the same machine in nix-shell, so I’m sure I’m getting the exact same version of hugo and go.

Here’s what I get with v0.132.1+extended:

hugo --gc --cleanDestinationDir --ignoreCache --logLevel debug
Start building sites …
hugo v0.132.1+extended linux/amd64 BuildDate=unknown VendorInfo=nixpkgs

INFO  static: removing all files from destination that don't exist in static dirs
INFO  static: syncing static files to / duration 967.95722ms
INFO  build:  step process substep collect files 38 files_total 38 pages_total 38 resources_total 0 duration 865.804µs
INFO  build:  step process duration 5.006789ms
DEBUG Set expanded permalink path for page pages/about.md to "/about/"
DEBUG Set expanded permalink path for page pages/free_trial.md to "/free_trial/"
DEBUG Set expanded permalink path for page pages/pricing.md to "/pricing/"
DEBUG Set expanded permalink path for page pages/see_a_demo.md to "/see_a_demo/"
INFO  build:  step assemble duration 965.22µs
WARN  deprecated: .Site.Social was deprecated in Hugo v0.124.0 and will be removed in a future release. Use .Site.Params instead.
WARN  deprecated: .Site.Authors was deprecated in Hugo v0.124.0 and will be removed in a future release. Use taxonomies instead.
ERROR render of "section" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: _default/list.html:22:7: executing "_default/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "404" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: 404.html:22:7: executing "404.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "section" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: contact/list.html:22:7: executing "contact/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "section" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: blog/list.html:22:7: executing "blog/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
INFO  build:  step render pages 43 content 26 duration 33.508204ms
INFO  build:  step render deferred count 0 duration 612ns
INFO  build:  step postProcess duration 4.789µs
ERROR TOCSS: failed to transform "style.scss" (text/x-scss): resource "scss/style.scss_d9077b5cab49df084fb1a39ad4b1e75d" not found in file cache
INFO  build:  duration 39.69698ms
Total in 1038 ms
Error: error building site: render: failed to render pages: render of "home" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: index.html:22:7: executing "index.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"

If I try to build with the latest release from github, I get the same error:

$ hugo --gc --cleanDestinationDir --ignoreCache --logLevel debug
INFO  deprecated: the ":slugorfilename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":slugorcontentbasename" instead.
INFO  deprecated: the ":slugorfilename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":slugorcontentbasename" instead.
INFO  deprecated: the ":slugorfilename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":slugorcontentbasename" instead.
Start building sites …
hugo v0.145.0-666444f0a52132f9fec9f71cf25b441cc6a4f355+extended linux/amd64 BuildDate=2025-02-26T15:41:25Z VendorInfo=gohugoio

INFO  static: removing all files from destination that don't exist in static dirs
INFO  static: syncing static files to / duration 979.520017ms
INFO  build:  step process substep collect files 38 files_total 38 pages_total 38 resources_total 0 duration 1.983871ms
INFO  build:  step process duration 2.033905ms
DEBUG Set expanded permalink path for page pages/about.md to "/about/"
DEBUG Set expanded permalink path for page pages/free_trial.md to "/free_trial/"
DEBUG Set expanded permalink path for page pages/pricing.md to "/pricing/"
DEBUG Set expanded permalink path for page pages/see_a_demo.md to "/see_a_demo/"
INFO  build:  step assemble duration 712.095µs
ERROR deprecated: .Site.Social was deprecated in Hugo v0.124.0 and subsequently removed. Implement taxonomy 'social' or use .Site.Params.Social instead.
ERROR deprecated: .Site.Authors was deprecated in Hugo v0.124.0 and subsequently removed. Implement taxonomy 'authors' or use .Site.Params.Author instead.
ERROR render of "/pages" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: _default/list.html:22:7: executing "_default/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "/legal" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: _default/list.html:22:7: executing "_default/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "/home/myuser/projects/mysite/content/blog/_index.md" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: blog/list.html:22:7: executing "blog/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "/404" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: 404.html:22:7: executing "404.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
INFO  build:  step render pages 43 content 26 duration 35.808649ms
INFO  build:  step render deferred count 0 duration 561ns
INFO  build:  step postProcess duration 5.631µs
ERROR TOCSS: failed to transform "style.scss" (text/x-scss): resource "scss/style.scss_d9077b5cab49df084fb1a39ad4b1e75d" not found in file cache
INFO  build:  duration 38.707375ms
Total in 1056 ms
Error: error building site: render: failed to render pages: render of "/home/myuser/projects/mysite/content/contact/_index.md" failed: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/_default/baseof.html:22:7": execute of template failed: template: contact/list.html:22:7: executing "contact/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/home/myuser/projects/mysite/themes/andromeda-light-hugo/layouts/partials/essentials/style.html:47:33": execute of template failed: template: partials/essentials/style.html:47:33: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"

It seems that the root error is ERROR TOCSS: failed to transform "style.scss" (text/x-scss): resource "scss/style.scss_d9077b5cab49df084fb1a39ad4b1e75d" not found in file cache. I’ve searched the discussions here and there are similar discussions, but they seem to resolve by using the extended version. However, I am using the extended version.

(Note: I have resolved the deprecated errors with 0.145.0 - these are not my main issue).

Any pointers to get me going in the right direction? I’ve been banging my head on this one for about over a day now…

You are more likely to receive a prompt and accurate response if you post a link to 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.

It’s not a public repo.

OK. What about this part?

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.

Missed that. Sure thing - here’s a stripped down anonymized public repo: GitHub - VisualSystemsCorp/hugo_error_example

First, you are using an old version of the andromeda-light-hugo theme. What you have now is incompatible with Hugo v0.140.0 and later.

Second, you have this in your site config:

[build]
useResourceCacheWhen = 'always' # why?

https://gohugo.io/configuration/build/#useresourcecachewhen