I was able to locally reproduce and solve the problem. This was my approach to troubleshooting…
git clone https://github.com/whanley/hugo-eureka
cd hugo-eureka
hugo
The site built without errors. So let’s delete the theme resources to reproduce the problem.
rm -rf themes/eureka/resources/
hugo
Result:
Error: Error building site: POSTCSS: failed to transform "css/eureka.css" (text/css): resource "css/css/eureka.css_fc3f76d7bee2760c3a903059afc3d9b2" not found in file cache
So, I need to install the various npm modules.
cp themes/eureka/package.json .
npm install
hugo
Result:
Error: Error building site: POSTCSS: failed to transform "css/eureka.css" (text/css): resource "css/css/eureka.css_fc3f76d7bee2760c3a903059afc3d9b2" not found in file cache
This should have generated the necessary files in resources/_gen/assets.
ls resources/_gen/assets/
The directory is empty. Hmm.
Then I saw the last two lines in your config.yaml file:
build:
useResourceCacheWhen: always
I had to look that one up:
https://gohugo.io/getting-started/configuration/#configure-build
Let’s change that:
build:
useResourceCacheWhen: fallback
And then build the site again:
hugo
Result:
Start building sites …
| EN
-------------------+-----
Pages | 57
Paginator pages | 1
Non-page files | 0
Static files | 0
Processed images | 3
Aliases | 14
Sitemaps | 1
Cleaned | 0
Total in 2794 ms