I am trying to move my website from Bulma to Tailwind. Tailwind requires PostCSS. I set the site up and everything works locally, both with hugo
and hugo server
.
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint | resources.PostProcess }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
But once I push to Netlify I get the following error:
10:17:13 PM: Installing Hugo 0.69.0
10:17:14 PM: Hugo Static Site Generator v0.69.0-4205844B/extended linux/amd64 BuildDate: 2020-04-10T09:16:58Z
10:17:14 PM: Started restoring cached go cache
10:17:14 PM: Finished restoring cached go cache
10:17:14 PM: unset GOOS;
10:17:14 PM: unset GOARCH;
10:17:14 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
10:17:14 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:17:14 PM: go version >&2;
10:17:14 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
10:17:14 PM: go version go1.12 linux/amd64
10:17:14 PM: Installing missing commands
10:17:14 PM: Verify run directory
10:17:14 PM: Executing user command: hugo -v --gc --minify
10:17:14 PM: INFO 2020/04/12 15:17:14 No translation bundle found for default language "en"
10:17:14 PM: INFO 2020/04/12 15:17:14 Translation func for language en not found, use default.
10:17:14 PM: INFO 2020/04/12 15:17:14 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
10:17:15 PM: INFO 2020/04/12 15:17:15 Using config file:
10:17:15 PM: Building sites …
10:17:15 PM: INFO 2020/04/12 15:17:15 syncing static files to /opt/build/repo/public/
10:17:17 PM: Total in 2580 ms
10:17:17 PM: Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): resource "css/css/styles.css_f2054ba793222939610cd2936fa9ba1e" not found in file cache
Netlify uses the latest Hugo release (0.69.0).
On my local machine the file that was created instead of the missing one is called styles.min.799082e60499a91e39e7baf8c2d30596fbecafbdbad0ad2ffeb4e578ff48035b
. It is not checked into Git so Netlify should not have an old version. (I tried Netlify’s Clear cache and deploy site
with no effect.)
The only hint I could find online was this issue about a new hash function: Build Script: Themes broken in 0.66.0.
I have no idea how it should affect me as I started using PostCSS with Hugo 0.68.1 before moving to 0.69.0.
I created a local Netlify environment which failed with issues that seem to be unrelated.
Does anyone know what’s going on or what I could try to debug? @bep, @alexandros, you’ve both been involved in the quoted issue. Any ideas?
Thanks in advance and Happy Easter!