We’re giving ZEIT Now a try to deploy Hugo. Our site uses some Hugo modules (theme components) and it causes deploy to fail.
You can perfectly install Go and Hugo on ZEIT to tailor your environment, so that’s what we did but we’re still facing a cache error on resource:
23:52:25.979 Installing Hugo 0.69.0...
23:52:27.869 Hugo Static Site Generator v0.69.0-4205844B/extended linux/amd64 BuildDate: 2020-04-10T09:16:58Z
23:52:27.977 Running Hugo...
23:52:28.602 hugo: collected modules in 602 ms
23:52:29.540 Building sites … Total in 1541 ms
23:52:29.541 Error: Error building site: POSTCSS: failed to transform "assets/css/main.css" (text/css): resource "scss/scss/main.scss_97926dd476e00bee4d471a0eb9d338c8" not found in file cache
Stores all the files which need be processed by Hugo Pipes. Only the files whose .Permalink or .RelPermalink are used will be published to the public directory. Note: assets directory is not created by default.
I don’t think this is a problem with Hugo Modules, but rather a NPM setup … or something.
*With PostCSS Hugo will first try to build it with … PostCSS.
If not, it will look in the file cache (default resources/_gen/…)
I’m not sure if you commit your resources folder or not
We did make some change to the option object in PostCSS that made the hashes change,ywhich would require a rebuild of those assets (unfortunately)
I’m not sure what applies to your situation.
So if you have PostCSS defined correctly in package.json then Netlify by default does a “npm install” before int builds, not sure what Zeit is doing. If not, the workaround is to commit the resources/_gen folder.