Deploy Fail - exit code 255? hugo?

I have been trying to update my website for the first time in a while. I had to change build image from Xenial to Focal. Website still wouldn’t build with the below error. I have looked at several similar forums and fiddled around with netlify.toml to no avail. Help would be much appreciated.

3:52:04 PM: Waiting for other deploys from your team to complete. Check the queue: Netlify App
3:52:10 PM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
3:52:10 PM: build-image tag: v4.16.1
3:52:10 PM: buildbot version: a1ec8307ac4591dcd155485cdfce7d7be735ab26
3:52:10 PM: Fetching cached dependencies
3:52:10 PM: Failed to fetch cache, continuing with build
3:52:10 PM: Starting to prepare the repo for build
3:52:10 PM: No cached dependencies found. Cloning fresh repo
3:52:10 PM: git clone --filter=blob:none git@github.com:drevol210/my-personal-website
3:52:12 PM: Preparing Git Reference refs/heads/master
3:52:12 PM: Parsing package.json dependencies
3:52:13 PM: Different build command detected, going to use the one specified in the Netlify configuration file: β€˜hugo --gc --minify -b $URL’ versus β€˜hugo’ in the Netlify UI
3:52:13 PM: Starting build script
3:52:13 PM: Installing dependencies
3:52:13 PM: Python version set to 2.7
3:52:14 PM: Downloading and installing node v12.18.0…
3:52:14 PM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz…
3:52:15 PM: Computing checksum with sha256sum
3:52:15 PM: Checksums matched!
3:52:16 PM: Now using node v12.18.0 (npm v6.14.4)
3:52:16 PM: Started restoring cached build plugins
3:52:16 PM: Finished restoring cached build plugins
3:52:16 PM: Attempting ruby version 2.7.1, read from environment
3:52:17 PM: Required ruby-2.7.1 is not installed - installing.
3:52:17 PM: Searching for binary rubies, this might take some time.
3:52:17 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.7.1.tar.bz2
3:52:17 PM: Checking requirements for ubuntu.
3:52:17 PM: Requirements installation successful.
3:52:17 PM: ruby-2.7.1 - #configure
3:52:17 PM: ruby-2.7.1 - #download
3:52:17 PM: ruby-2.7.1 - #validate archive
3:52:20 PM: ruby-2.7.1 - #extract
3:52:22 PM: ruby-2.7.1 - #validate binary
3:52:22 PM: ruby-2.7.1 - #setup
3:52:23 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
3:52:23 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems…
3:52:23 PM: ruby-2.7.1 - #generating global wrappers…
3:52:23 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
3:52:23 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
3:52:23 PM: ruby-2.7.1 - #generating default wrappers…
3:52:23 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
3:52:24 PM: Using ruby version 2.7.1
3:52:24 PM: Using PHP version 8.0
3:52:24 PM: Installing Hugo 0.83.1
3:52:24 PM: hugo v0.83.1-5AFE0A57+extended linux/amd64 BuildDate=2021-05-02T14:38:05Z VendorInfo=gohugoio
3:52:24 PM: Started restoring cached go cache
3:52:24 PM: Finished restoring cached go cache
3:52:24 PM: Installing Go version 1.14.4 (requested 1.14.4)
3:52:28 PM: unset GOOS;
3:52:28 PM: unset GOARCH;
3:52:28 PM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64’;
3:52:28 PM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64/bin:${PATH}”;
3:52:28 PM: go version >&2;
3:52:28 PM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.14.4.linux.amd64.env”
3:52:28 PM: go version go1.14.4 linux/amd64
3:52:28 PM: Detected 0 framework(s)
3:52:28 PM: Installing missing commands
3:52:28 PM: Verify run directory
3:52:28 PM: Section completed: initializing
3:52:29 PM: ​
3:52:29 PM: Netlify Build
3:52:29 PM: ────────────────────────────────────────────────────────────────
3:52:29 PM: ​
3:52:29 PM: ❯ Version
3:52:29 PM: @netlify/build 29.4.0
3:52:29 PM: ​
3:52:29 PM: ❯ Flags
3:52:29 PM: baseRelDir: true
3:52:29 PM: buildId: 63b65774085805000885a92d
3:52:29 PM: deployId: 63b65774085805000885a92f
3:52:29 PM: ​
3:52:29 PM: ❯ Current directory
3:52:29 PM: /opt/build/repo
3:52:29 PM: ​
3:52:29 PM: ❯ Config file
3:52:29 PM: /opt/build/repo/netlify.toml
3:52:29 PM: ​
3:52:29 PM: ❯ Context
3:52:29 PM: production
3:52:30 PM: ​
3:52:30 PM: ❯ Installing plugins
3:52:30 PM: - netlify-plugin-hugo-cache-resources@0.2.1
3:52:31 PM: ​
3:52:31 PM: ❯ Loading plugins
3:52:31 PM: - netlify-plugin-hugo-cache-resources@0.2.1 from netlify.toml
3:52:32 PM: ​
3:52:32 PM: 1. netlify-plugin-hugo-cache-resources (onPreBuild event)
3:52:32 PM: ────────────────────────────────────────────────────────────────
3:52:32 PM: ​
3:52:32 PM: Checking if resources exist at β€œresources”
3:52:32 PM: No cache found for resources folder
3:52:32 PM: ​
3:52:32 PM: (netlify-plugin-hugo-cache-resources onPreBuild completed in 7ms)
3:52:32 PM: ​
3:52:32 PM: 2. build.command from netlify.toml
3:52:32 PM: ────────────────────────────────────────────────────────────────
3:52:32 PM: ​
3:52:32 PM: $ hugo --gc --minify -b $URL
3:52:34 PM: hugo: collected modules in 1342 ms
3:52:34 PM: Start building sites …
3:52:34 PM: Total in 2183 ms
3:52:34 PM: Error: Error building site: failed to render pages: render of β€œhome” failed: execute of template failed: template: index.html:21:5: executing β€œmain” at <partial β€œwidget_page.html” .>: error calling partial: execute of template failed: template: partials/widget_page.html:134:9: executing β€œpartials/widget_page.html” at <partial $widget_path $widget_args>: error calling partial: β€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy@v0.0.0-20210606130713-db4dcf6541e5/layouts/partials/widgets/experience.html:51:25”: execute of template failed: template: partials/widgets/experience.html:51:25: executing β€œpartials/widgets/experience.html” at <.date_start>: can’t evaluate field Format in type *errors.errorString
​
3:52:34 PM: β€œbuild.command” failed
3:52:34 PM: ────────────────────────────────────────────────────────────────
3:52:34 PM: ​
3:52:34 PM: Error message
3:52:34 PM: Command failed with exit code 255: hugo --gc --minify -b $URL (Search results for '"non-zero exit code: 255"' - Netlify Support Forums)
3:52:34 PM: ​
3:52:34 PM: Error location
3:52:34 PM: In build.command from netlify.toml:
3:52:34 PM: hugo --gc --minify -b $URL
3:52:34 PM: ​
3:52:34 PM: Resolved config
3:52:34 PM: build:
3:52:34 PM: command: hugo --gc --minify -b $URL
3:52:34 PM: commandOrigin: config
3:52:34 PM: environment:
3:52:34 PM: - HUGO_VERSION
3:52:34 PM: - HUGO_ENABLEGITINFO
3:52:34 PM: - HUGO_ENV
3:52:34 PM: publish: /opt/build/repo/public
3:52:34 PM: publishOrigin: config
3:52:34 PM: plugins:
3:52:34 PM: - inputs:
3:52:34 PM: debug: true
3:52:34 PM: origin: config
3:52:34 PM: package: netlify-plugin-hugo-cache-resources
3:52:35 PM: Caching artifacts
3:52:35 PM: Started saving build plugins
3:52:35 PM: Finished saving build plugins
3:52:35 PM: Started saving pip cache
3:52:35 PM: Finished saving pip cache
3:52:35 PM: Started saving emacs cask dependencies
3:52:35 PM: Finished saving emacs cask dependencies
3:52:35 PM: Started saving maven dependencies
3:52:35 PM: Finished saving maven dependencies
3:52:35 PM: Started saving boot dependencies
3:52:35 PM: Finished saving boot dependencies
3:52:36 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
3:52:35 PM: Started saving rust rustup cache
3:52:35 PM: Finished saving rust rustup cache
3:52:35 PM: Started saving go dependencies
3:52:35 PM: Finished saving go dependencies
3:52:36 PM: Cached ruby version 2.7.1
3:52:36 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:52:36 PM: Failing build: Failed to build site
3:52:36 PM: Finished processing build request in 26.413910409s

There’s something wrong with the data being used in this partial. Since it’s not a piece of code written by you, you can try contacting the theme’s devs.

1 Like