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


#1

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.


#2

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


#3

Following the addition of cache config.

Do you guys have a specific cacheDir config?


#4

Do you run Windows?


#5

Yes, running under Windows 10.


#6

No. And I deleted the cache folder.


#7

#8

Thanks @bep. I will roll back for now.


#9

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


#10

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


#11

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


#12

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)


#13

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

but the other themes is working fine


#14

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.


#15

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.


#16

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.


#17

Sorry, I don’t use GitLab.


#18

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

#19

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


#20