Scss file not found in cache

I am building a site that uses Hugo and React components. The code is public here: GitHub - Human-Singularity/gregory-ms-website: source code for https://gregory-ms.com/

I am getting an error when I try to build a site locally.

hugo v0.147.9+extended+withdeploy darwin/arm64 BuildDate=2025-06-23T08:22:20Z VendorInfo=brew

ERROR TOCSS: failed to transform "/scss/gregory-custom.scss" (text/x-scss): resource "scss/gregory-custom.scss_0252447c68d73c4e102938ec629adfe5" not found in file cache
ERROR TOCSS: failed to transform "/scss/now-ui-kit.scss" (text/x-scss): resource "scss/now-ui-kit.scss_0252447c68d73c4e102938ec629adfe5" not found in file cache
Built in 1224 ms
Error: error building site: TOCSS: failed to transform "/scss/gregory-custom.scss" (text/x-scss): resource "scss/gregory-custom.scss_0252447c68d73c4e102938ec629adfe5" not found in file cache

I have already tried to delete the resources folder and update the package.json, and the odd thing is that in production, the site still builds perfectly. Also tried to run hugo from docker, and the problem persists.

The relevant part of the code seems to be this one:

	{{- $bootstrap := resources.Get "css/bootstrap.min.css" -}}
	{{- $nowUi := resources.Get "scss/now-ui-kit.scss" | toCSS (dict "enableSourceMap" false "outputStyle" "compressed") -}}
	{{- $gregoryCustom := resources.Get "scss/gregory-custom.scss" | toCSS (dict "enableSourceMap" false "outputStyle" "compressed") -}}
	{{- $badges := resources.Get "css/badges.css" | resources.Fingerprint -}}
	{{ $montserrat := resources.Get "css/Montserrat.css" | resources.Fingerprint }}
	{{ $styles := slice $nowUi  | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}

	<link rel="stylesheet" href="{{ $bootstrap.Permalink }}" media="screen" />
	<link rel="stylesheet" href="{{ $gregoryCustom.Permalink }}" media="screen" />
	<link rel="stylesheet" href="{{ $nowUi.Permalink }}" integrity="{{ $nowUi.Data.Integrity }}">
	<link rel="stylesheet" href="{{$montserrat.Permalink}}">
	<link rel="stylesheet" href="{{$badges.Permalink}}">
	<script src="https://kit.fontawesome.com/16e8434146.js" crossorigin="anonymous"></script>

Does anyone have any idea what could be causing the issue on my machine?

Your site config…

useResourceCacheWhen = "always" # fallback, always, never

Change to fallback or never.

Thank you! :person_bowing:
I was going crazy trying to figure this out.

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