wangchucheng / hugo-eureka

Eureka is a feature-rich and highly customizable Hugo theme.
https://www.wangchucheng.com/en/docs/hugo-eureka/
Apache License 2.0
926 stars 193 forks source link

ERROR POSTCSS: failed to transform "/css/eureka.css" (text/css): resource #249

Open Steve-Shao opened 4 months ago

Steve-Shao commented 4 months ago

Describe the bug

I've been using the eureka theme for a few years, but in a recent edit, when I used hugo server, I got:

ERROR POSTCSS: failed to transform "/css/eureka.css" (text/css): resource "css/eureka.css_59122205213644db2a335025f85b41bf" not found in file cache
Built in 184 ms
Error: error building site: POSTCSS: failed to transform "/css/eureka.css" (text/css): resource "css/eureka.css_59122205213644db2a335025f85b41bf" not found in file cache

I searched on the web and this error seems to happen when hugo upgrades, but I've not found a good solution that works for me.

yashlala commented 3 weeks ago

I don't know why this happens -- but I can tell you the steps that fixed the problem for me:

  1. Go to the eureka submodules directory, and run hugo mod clean.
  2. Run hugo mod clean in the project root.
  3. Run hugo build to build the project.

Hopefully this helps.

thebeanogamer commented 1 week ago

I also ran into this, https://discourse.gohugo.io/t/error-building-site-postcss/31766/2 fixed it for me