Hugo and Cloudflare Pages

My Hugo site has suddenly stopped building on cloudflare pages, only 1 paragraph of text has changed since my last build 8 days ago and it builds fine on my home machine with

$NODE_ENV=production hugo --minify

The the node stuff is because of tailwind css and postcss. Error below.

Thanks in advance for any pointers or ideas.
David

13:55:59.577	Installing Hugo 0.84.0
13:56:00.472	hugo v0.84.0-2C4689F7B+extended linux/amd64 BuildDate=2021-06-18T17:14:27Z VendorInfo=gohugoio
13:56:00.474	Started restoring cached go cache
13:56:00.477	Finished restoring cached go cache
13:56:00.502	go version go1.14.4 linux/amd64
13:56:00.507	go version go1.14.4 linux/amd64
13:56:00.508	Installing missing commands
13:56:00.508	Verify run directory
13:56:00.508	Executing user command: hugo --minify
13:56:00.540	Start building sites … 
13:56:00.540	hugo v0.84.0-2C4689F7B+extended linux/amd64 BuildDate=2021-06-18T17:14:27Z VendorInfo=gohugoio
13:56:05.730	Total in 5200 ms
13:56:05.730	Error: Error copying static files: chtimes /opt/buildhome/repo/public/: operation not permitted
13:56:05.735	Failed: build command exited with code: 255

Try this update, more here.

No, the above is another error.

You should really ask Cloudflare about this – not permitting chtimes on their output folder does not make sense.

That said, you can probably work around it by

hugo --noTimes
2 Likes

Ok, thanks a million for the insights. I have something to work with now.

I must say I love Hugo, it is a little harder to pick up than Jekyll, but the site I built is conceptually a lot simpler. Its very easy to set up tailwind with Hugo and that was the main reason I changed. I especially love using cue (another go ecosystem project) to build a big json config file I use for something, though technically I could do that with Jekyll too.

Thanks Hugo team.
David

Thanks, I upgraded to Hugo 0.85.0 on my machine and with the environment variable on Cloudflare Pages. That solved the problem without using the --noTimes flag.

Regards
David