HUGO

Archives theme: minimum required Hugo version is 0.69

I’m trying to upload my Hugo website to Netlify but I’m getting a Command failed with exit code 255: hugo error during the build process. Since this is something I’ve hand-coded on my own I’m sure there is some essential file that I missed in the process, which is throwing everything off.

My entire repo is uploaded here: GitHub - thedivtagguy/srishtiarchives

Deploy log is given below:

6:48:17 PM: Build ready to start
6:48:20 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
6:48:20 PM: build-image tag: v3.6.1
6:48:20 PM: buildbot version: 3f7ff7bbf92b8c2ecf180659ea5b1472b472d308
6:48:20 PM: Fetching cached dependencies
6:48:20 PM: Failed to fetch cache, continuing with build
6:48:20 PM: Starting to prepare the repo for build
6:48:21 PM: No cached dependencies found. Cloning fresh repo
6:48:21 PM: git clone https://github.com/thedivtagguy/srishtiarchives
6:48:21 PM: Preparing Git Reference refs/heads/master
6:48:23 PM: Starting build script
6:48:23 PM: Installing dependencies
6:48:23 PM: Python version set to 2.7
6:48:24 PM: v12.18.0 is already installed.
6:48:25 PM: Now using node v12.18.0 (npm v6.14.4)
6:48:25 PM: Started restoring cached build plugins
6:48:25 PM: Finished restoring cached build plugins
6:48:25 PM: Attempting ruby version 2.7.1, read from environment
6:48:26 PM: Using ruby version 2.7.1
6:48:27 PM: Using PHP version 5.6
6:48:27 PM: Installing Hugo 0.54.0
6:48:28 PM: Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
6:48:28 PM: Started restoring cached go cache
6:48:28 PM: Finished restoring cached go cache
6:48:28 PM: go version go1.14.4 linux/amd64
6:48:28 PM: go version go1.14.4 linux/amd64
6:48:28 PM: Installing missing commands
6:48:28 PM: Verify run directory
6:48:29 PM: ​
6:48:29 PM: ────────────────────────────────────────────────────────────────
6:48:29 PM:   Netlify Build                                                 
6:48:29 PM: ────────────────────────────────────────────────────────────────
6:48:29 PM: ​
6:48:29 PM: ❯ Version
6:48:29 PM:   @netlify/build 9.1.2
6:48:29 PM: ​
6:48:29 PM: ❯ Flags
6:48:29 PM:   deployId: 602e6919def5380007a9640a
6:48:29 PM:   mode: buildbot
6:48:29 PM: ​
6:48:29 PM: ❯ Current directory
6:48:29 PM:   /opt/build/repo
6:48:29 PM: ​
6:48:29 PM: ❯ Config file
6:48:29 PM:   /opt/build/repo/netlify.toml
6:48:29 PM: ​
6:48:29 PM: ❯ Context
6:48:29 PM:   production
6:48:29 PM: ​
6:48:29 PM: ────────────────────────────────────────────────────────────────
6:48:29 PM:   1. build.command from netlify.toml                            
6:48:29 PM: ────────────────────────────────────────────────────────────────
6:48:29 PM: ​
6:48:29 PM: $ hugo
6:48:30 PM: ERROR 2021/02/18 13:18:30 ARCHIVES theme does not support Hugo version 0.54.0. Minimum version required is 0.69
6:48:30 PM: Building sites … ERROR 2021/02/18 13:18:30 render of "page" failed: execute of template failed: template: _default/single.html:3:7: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/build/repo/themes/archives/layouts/partials/head.html:22:55": execute of template failed: template: partials/head.html:22:55: executing "partials/head.html" at <resources>: can't evaluate field PostProcess in type interface {}ERROR 2021/02/18 13:18:30 render of "page" failed: execute of template failed: template: _default/single.html:3:7: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/build/repo/themes/archives/layouts/partials/head.html:22:55": execute of template failed: template: partials/head.html:22:55: executing "partials/head.html" at <resources>: can't evaluate field PostProcess in type interface {}ERROR 2021/02/18 13:18:30 render of "page" failed: execute of template failed: template: _default/guide.html:3:7: executing "_default/guide.html" at <partial "head.html" ...>: error calling partial: "/opt/build/repo/themes/archives/layouts/partials/head.html:22:55": execute of template failed: template: partials/head.html:22:55: executing "partials/head.html" at <resources>: can't evaluate field PostProcess in type interface {}ERROR 2021/02/18 13:18:30 render of "page" failed: execute of template failed: template: _default/single.html:3:7: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/build/repo/themes/archives/layouts/partials/head.html:22:55": execute of template failed: template: partials/head.html:22:55: executing "partials/head.html" at <resources>: can't evaluate field PostProcess in type interface {}Total in 9 ms
6:48:30 PM: Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:7: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/build/repo/themes/archives/layouts/partials/head.html:22:55": execute of template failed: template: partials/head.html:22:55: executing "partials/head.html" at <resources>: can't evaluate field PostProcess in type interface {}​
6:48:30 PM: ────────────────────────────────────────────────────────────────
6:48:30 PM:   "build.command" failed                                        
6:48:30 PM: ────────────────────────────────────────────────────────────────
6:48:30 PM: ​
6:48:30 PM:   Error message
6:48:30 PM:   Command failed with exit code 255: hugo
6:48:30 PM: ​
6:48:30 PM:   Error location
6:48:30 PM:   In build.command from netlify.toml:
6:48:30 PM:   hugo
6:48:30 PM: ​
6:48:30 PM:   Resolved config
6:48:30 PM:   build:
6:48:30 PM:     command: hugo
6:48:30 PM:     commandOrigin: config
6:48:30 PM:     environment:
6:48:30 PM:       - HUGO_VERSION
6:48:30 PM:       - HUGO_ENV
6:48:30 PM:       - HUGO_ENABLEGITINFO
6:48:30 PM:     publish: /opt/build/repo/public
6:48:30 PM: Caching artifacts
6:48:30 PM: Started saving build plugins
6:48:30 PM: Finished saving build plugins
6:48:30 PM: Started saving pip cache
6:48:30 PM: Finished saving pip cache
6:48:30 PM: Started saving emacs cask dependencies
6:48:30 PM: Finished saving emacs cask dependencies
6:48:30 PM: Started saving maven dependencies
6:48:30 PM: Finished saving maven dependencies
6:48:30 PM: Started saving boot dependencies
6:48:30 PM: Finished saving boot dependencies
6:48:30 PM: Started saving rust rustup cache
6:48:30 PM: Finished saving rust rustup cache
6:48:30 PM: Started saving go dependencies
6:48:30 PM: Finished saving go dependencies
6:48:33 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:48:33 PM: Failing build: Failed to build site
6:48:33 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
6:48:33 PM: Finished processing build request in 12.654455975s

Based on previous answers I found on the forums, I thought this was because I was missing netlify.toml file (which I was), and so I added the following:

[build] 
  publish = "public"
  command = "hugo"

[context.production.environment]
  HUGO_VERSION = "0.54.0" # if older, use format: 0.53 (no trailing zero)
  HUGO_ENV = "production"
  HUGO_ENABLEGITINFO = "true"
  
[context.branch-deploy.environment]
  HUGO_VERSION = "0.54.0" # if older, use format: 0.53 (no trailing zero)

[context.deploy-preview.environment]
  HUGO_VERSION = "0.54.0"

This also does nothing to fix the error. What am I doing wrong and how can I fix this?

The error log explicitly mentions that:

ERROR 2021/02/18 13:18:30 ARCHIVES theme does not support Hugo version 0.54.0. Minimum version required is 0.69

So basically in netlify.toml you need to set the Hugo version to 0.69.0 or higher.

I changed the version to 0.69 but now I have this error in my build process:

7:24:14 PM: Installing Hugo 0.69
7:24:15 PM: Error during Hugo 0.69 install: error downloading project gohugoio/hugo, from https://github.com/gohugoio/hugo/releases/download/v0.69/hugo_extended_0.69_Linux-64bit.tar.gz - binary doesn't seem to exist: 404
7:24:15 PM: Build was terminated: Build script returned non-zero exit code: 1
7:24:15 PM: Failing build: Failed to build site
7:24:16 PM: Finished processing build request in 12.046969144s

Has the file been moved somewhere, hence the 404 error?

EDIT: Just responding to the title change. Archives theme is not an official or downloadable Hugo theme. It’s a private, handmade template that I’m using for my website.

The URL/version number is wrong. It should be:

https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_extended_0.69.0_Linux-64bit.tar.gz

So “0.69.0”, not “0.69”.

You can see releases here Releases · gohugoio/hugo · GitHub

This is where the minimum version is set:

I changed 0.69 to 0.69.0 but there is no change in the error log:

7:49:55 PM: Build ready to start
7:49:57 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
7:49:57 PM: build-image tag: v3.6.1
7:49:57 PM: buildbot version: 3f7ff7bbf92b8c2ecf180659ea5b1472b472d308
7:49:57 PM: Fetching cached dependencies
7:49:57 PM: Failed to fetch cache, continuing with build
7:49:57 PM: Starting to prepare the repo for build
7:49:57 PM: No cached dependencies found. Cloning fresh repo
7:49:57 PM: git clone https://github.com/thedivtagguy/srishtiarchives
7:49:58 PM: Preparing Git Reference refs/heads/master
7:50:00 PM: Starting build script
7:50:00 PM: Installing dependencies
7:50:00 PM: Python version set to 2.7
7:50:02 PM: v12.18.0 is already installed.
7:50:03 PM: Now using node v12.18.0 (npm v6.14.4)
7:50:03 PM: Started restoring cached build plugins
7:50:03 PM: Finished restoring cached build plugins
7:50:03 PM: Attempting ruby version 2.7.1, read from environment
7:50:05 PM: Using ruby version 2.7.1
7:50:06 PM: Using PHP version 5.6
7:50:06 PM: Installing Hugo 0.69.0
7:50:07 PM: Hugo Static Site Generator v0.69.0-4205844B/extended linux/amd64 BuildDate: 2020-04-10T09:16:58Z
7:50:07 PM: Started restoring cached go cache
7:50:07 PM: Finished restoring cached go cache
7:50:07 PM: go version go1.14.4 linux/amd64
7:50:07 PM: go version go1.14.4 linux/amd64
7:50:07 PM: Installing missing commands
7:50:07 PM: Verify run directory
7:50:09 PM: ​
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM:   Netlify Build                                                 
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM: ​
7:50:09 PM: ❯ Version
7:50:09 PM:   @netlify/build 9.1.2
7:50:09 PM: ​
7:50:09 PM: ❯ Flags
7:50:09 PM:   deployId: 602e778aa35b1600070ceb69
7:50:09 PM:   mode: buildbot
7:50:09 PM: ​
7:50:09 PM: ❯ Current directory
7:50:09 PM:   /opt/build/repo
7:50:09 PM: ​
7:50:09 PM: ❯ Config file
7:50:09 PM:   /opt/build/repo/netlify.toml
7:50:09 PM: ​
7:50:09 PM: ❯ Context
7:50:09 PM:   production
7:50:09 PM: ​
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM:   1. build.command from netlify.toml                            
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM: ​
7:50:09 PM: $ hugo
7:50:09 PM: Building sites … WARN 2021/02/18 14:20:09 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url
7:50:09 PM: Total in 89 ms
7:50:09 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
7:50:09 PM: ​
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM:   "build.command" failed                                        
7:50:09 PM: ────────────────────────────────────────────────────────────────
7:50:09 PM: ​
7:50:09 PM:   Error message
7:50:09 PM:   Command failed with exit code 255: hugo
7:50:09 PM: ​
7:50:09 PM:   Error location
7:50:09 PM:   In build.command from netlify.toml:
7:50:09 PM:   hugo
7:50:09 PM: ​
7:50:09 PM:   Resolved config
7:50:09 PM:   build:
7:50:09 PM:     command: hugo
7:50:09 PM:     commandOrigin: config
7:50:09 PM:     environment:
7:50:09 PM:       - HUGO_VERSION
7:50:09 PM:       - HUGO_ENV
7:50:09 PM:       - HUGO_ENABLEGITINFO
7:50:09 PM:     publish: /opt/build/repo/public
7:50:10 PM: Caching artifacts
7:50:10 PM: Started saving build plugins
7:50:10 PM: Finished saving build plugins
7:50:10 PM: Started saving pip cache
7:50:10 PM: Finished saving pip cache
7:50:10 PM: Started saving emacs cask dependencies
7:50:10 PM: Finished saving emacs cask dependencies
7:50:10 PM: Started saving maven dependencies
7:50:10 PM: Finished saving maven dependencies
7:50:10 PM: Started saving boot dependencies
7:50:10 PM: Finished saving boot dependencies
7:50:10 PM: Started saving rust rustup cache
7:50:10 PM: Finished saving rust rustup cache
7:50:10 PM: Started saving go dependencies
7:50:10 PM: Finished saving go dependencies
7:50:14 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:50:14 PM: Failing build: Failed to build site
7:50:14 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
7:50:14 PM: Finished processing build request in 16.935463453s

Another thing I’m just noticing is

Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): resource "css/css/styles.css_f2054ba793222939610cd2936fa9ba1e" not found in file cache

Could this be causing the issue? I’ve used a tailwind starter theme (GitHub - dirkolbrich/hugo-theme-tailwindcss-starter: Starter files for a Hugo theme with Tailwindcss) and not changed any of the processing code so I don’t even know where to start fixing this.

1 Like

Thank you, that fixed it! Should have looked there beforehand :sweat_smile:

Still it is a theme error. The Using Themes category is meant for themes public or otherwise.

Also in my reply above I wrote:

The numbering of recent Hugo versions takes an extra zero at the end. Version 0.69 does not exist therefore Netlify could not find it.

Glad @frjo heped you solve the deployment issue.

1 Like

Thank you for clarifying! I just didn’t want to cause any confusion so I thought I’d add some explanation :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.