Error: failed to create file caches from configuration: file exists

I’m getting this error but I’m not getting any clue as to what is causing it - which file is it objecting to? It doesn’t tell me.

I tried deleting the temporary cache folder and that doesn’t help. Also tried deleting the resources folder.

I’m using the latest Hugo with a new site and the hugo-serif theme freshly downloaded as a submodule.

1 Like

Same here. Just updated Hugo to latest version and this error pops up.

Following the addition of cache config.

Do you guys have a specific cacheDir config?

Do you run Windows?

Yes, running under Windows 10.

No. And I deleted the cache folder.

Thanks @bep. I will roll back for now.

I have tried, but I cannot reproduce this error, which also means that I cannot fix it (without guessing).

@systemallica you mentioned having the same issue, is the context similar to @TotallyInformation?

@regis Yes, same thing. Windows 10 and no specific cacheDir.

I add the same issue. But actually this depends on the template. Works with ananke but not with hugofresh for instance. So I guess this is a compatibility issue.
(just following the getting started allows to reproduce)

same problem here when i tried to run (hugo server) line with tale theme

but the other themes is working fine

I just encountered the same issue

Platform: Windows 10 Pro x64
Theme: hugo-coder

No custom cache

Using pre-built binary from hugo_0.52_Windows-64bit.zip
Running via Powershell, error message received was:

Error: failed to create file caches from configuration: file exists

Using pre-built binary from hugo_0.52_Linux-64bit.tar.gz
Running via Linux Subsystem for Windows, error message received was:

Building sites … ERROR 2018/12/11 17:44:41 error: failed to transform resource: TOCSS: failed to transform “style.coder.css” (text/x-scss): this feature is not available in your current Hugo version
Total in 10 ms
Error: Error building site: logged 1 error(s)

Using pre-built binary from hugo_extended_0.52_Windows-64bit.zip
Running via Powershell, error message received was:

Error: failed to create file caches from configuration: file exists

Using pre-built binary from hugo_extended_0.52_Linux-64bit.tar.gz
Running via Linux Subsystem for Windows, succeeded.

If someone can point me to a “site that fails” with the Hugo source code ready to build, I will have a look at it. These “my site fails with this theme, but works with that” is not something that I can work with.

Hi @bep, if you can PM me a GitLab account ID - I’m happy to add you to my private repo which would enable you to see the issue hopefully.

I accept that this might be a theme issue, I am using my own theme which is publicly available here:

My site builds fine with v0.51 on Netlify …

Drat!! I’ve just re-run using:

> C:/src/Hugo/bin/hugo version

Hugo Static Site Generator v0.52/extended windows/amd64 BuildDate: unknown

and it worked fine this time!

I’ve no idea what has happened. I have had some Windows updates but the only thing I’ve changed on my site since last time was the netlify.toml file, adding some handy shortcut redirects. That has been pushed to the repo a few times.

Let me try bumping the version in Netlify … Yes, inevitably it worked just fine.

:frowning: You are still welcome to try my repo but it looks like some other interaction is causing the issue.

Sorry, I don’t use GitLab.

I’m able to reproduce this by using the example site of the hugo-coder theme.

I get the error on my Windows 10 laptop, but not on my MacBook. Let me know if you need more info.

Hugo version

Hugo Static Site Generator v0.52/extended windows/amd64 BuildDate: unknown

Steps to reproduce

git clone https://github.com/luizdepra/hugo-coder.git
cd hugo-coder\exampleSite
hugo --themesDir ../..

Error received

Error: failed to create file caches from configuration: file exists
2 Likes

Yes, that fails for me, too, on my Windows 10 VM – I will fix. Thanks!

2 Likes
2 Likes