Exit code error

Hi.

I am having issues with deploying my site. can someone help me out?

I am having the same issue. The Gimme Go install is misbehaving.

Thank you for reporting, you all! We are seeing a few more reports of this and it has been escalated to the devs to investigate.

Could you all try to clear cache and deploy to see if it works?

Yes I just did and the deploy failed again

Could you share the link?

For sure

Here it is: Netlify App

Thank you, weโ€™ve shared that with the devs.

Could you try to set an environment variable named: GO_VERSION with the value 1.19.4?

Where should I set this variable? In my git repository?

Either in netlify.toml like:

[build.environment]
  GO_VERSION = "1.19.4"

or in your Site Settings (on Netlify UI) โ†’ Environment Variables.

Hi,

I tried it and it seemed like it worked and then it failed.

10:14:33 AM: build-image version: 524714d1a66d1a967316f5c39465e22c77fdd56c (focal)
10:14:33 AM: build-image tag: v4.16.0
10:14:33 AM: buildbot version: ccca89b58bb45671b9608069deb629f8ca866189
10:14:33 AM: Fetching cached dependencies
10:14:33 AM: Failed to fetch cache, continuing with build
10:14:33 AM: Starting to prepare the repo for build
10:14:33 AM: No cached dependencies found. Cloning fresh repo
10:14:33 AM: git clone GitHub - reke1608/rekeportfolio
10:14:34 AM: Preparing Git Reference refs/heads/main
10:14:34 AM: Parsing package.json dependencies
10:14:35 AM: Section completed: initializing
10:14:35 AM: Starting build script
10:14:35 AM: Installing dependencies
10:14:35 AM: Python version set to 2.7
10:14:35 AM: Downloading and installing node v16.19.0โ€ฆ
10:14:35 AM: Downloading https://nodejs.org/dist/v16.19.0/node-v16.19.0-linux-x64.tar.xzโ€ฆ
10:14:36 AM: Computing checksum with sha256sum
10:14:36 AM: Checksums matched!
10:14:38 AM: Now using node v16.19.0 (npm v8.19.3)
10:14:38 AM: Enabling node corepack
10:14:38 AM: Started restoring cached build plugins
10:14:38 AM: Finished restoring cached build plugins
10:14:38 AM: Attempting ruby version 2.7.2, read from environment
10:14:38 AM: Using ruby version 2.7.2
10:14:38 AM: Using PHP version 8.0
10:14:38 AM: Started restoring cached go cache
10:14:38 AM: Finished restoring cached go cache
10:14:38 AM: Installing Go version 1.19.4 (requested 1.19.4)
10:14:38 AM: unset GOOS;
10:14:38 AM: unset GOARCH;
10:14:38 AM: export GOROOT=โ€˜/opt/buildhome/.gimme/versions/go1.19.4.linux.amd64โ€™;
10:14:38 AM: export PATH=โ€œ/opt/buildhome/.gimme/versions/go1.19.4.linux.amd64/bin:${PATH}โ€;
10:14:38 AM: go version >&2;
10:14:38 AM: export GIMME_ENV=โ€˜/opt/buildhome/.gimme/env/go1.19.4.linux.amd64.envโ€™;
10:14:38 AM: go version go1.19.4 linux/amd64
10:14:39 AM: Detected 0 framework(s)
10:14:39 AM: Installing missing commands
10:14:39 AM: Verify run directory
10:14:40 AM: โ€‹
10:14:40 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:40 AM: Netlify Build
10:14:40 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Version
10:14:40 AM: @netlify/build 29.1.2
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Flags
10:14:40 AM: baseRelDir: true
10:14:40 AM: buildId: 639deae33b39e600086f5b0a
10:14:40 AM: deployId: 639deae33b39e600086f5b0c
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Current directory
10:14:40 AM: /opt/build/repo
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Config file
10:14:40 AM: /opt/build/repo/netlify.toml
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Context
10:14:40 AM: production
10:14:40 AM: โ€‹
10:14:40 AM: โฏ Installing plugins
10:14:40 AM: - netlify-plugin-hugo-cache-resources@0.2.1
10:14:41 AM: โ€‹
10:14:41 AM: โฏ Loading plugins
10:14:41 AM: - netlify-plugin-hugo-cache-resources@0.2.1 from netlify.toml
10:14:42 AM: โ€‹
10:14:42 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:42 AM: 1. netlify-plugin-hugo-cache-resources (onPreBuild event)
10:14:42 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:42 AM: โ€‹
10:14:42 AM: Checking if resources exist at โ€œresourcesโ€
10:14:42 AM: No cache found for resources folder
10:14:42 AM: โ€‹
10:14:42 AM: (netlify-plugin-hugo-cache-resources onPreBuild completed in 8ms)
10:14:42 AM: โ€‹
10:14:42 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:42 AM: 2. build.command from netlify.toml
10:14:42 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:42 AM: โ€‹
10:14:42 AM: $ hugo --gc --minify -b $URL
10:14:44 AM: hugo: downloading modules โ€ฆ
10:14:47 AM: go: downloading GitHub - wowchemy/wowchemy-hugo-themes: ๐Ÿ”ฅ Hugo website builder, Hugo themes & Hugo CMS. No code, easily build with blocks! ๅˆ›ๅปบๅœจ็บฟ่ฏพ็จ‹๏ผŒๅญฆๆœฏ็ฎ€ๅŽ†ๆˆ–ๅˆๅˆ›็ฝ‘็ซ™ใ€‚#OpenScience v4.8.0+incompatible
10:14:50 AM: go: downloading github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.0
10:14:50 AM: go: upgraded github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.6.0 => v5.7.0
10:14:51 AM: hugo: collected modules in 8110 ms
10:14:51 AM: Start building sites โ€ฆ
10:14:51 AM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
10:14:51 AM: ERROR 2022/12/17 16:14:51 Hugo Chroma themes github-light.css and dracula.css not found in css/libs/chroma/. See hugo gen chromastyles | Hugo
10:14:53 AM: ERROR 2022/12/17 16:14:53 render of โ€œtermโ€ failed: execute of template failed: template: authors/list.html:7:3: executing โ€œauthors/list.htmlโ€ at <partial โ€œsite_headโ€ .>: error calling partial: execute of template failed: template: partials/site_head.html:174:5: executing โ€œpartials/site_head.htmlโ€ at <partial โ€œwowchemy_seoโ€ .>: error calling partial: execute of template failed: template: partials/wowchemy_seo.html:6:3: executing โ€œpartials/wowchemy_seo.htmlโ€ at <partial โ€œseo_tagsโ€ .>: error calling partial: execute of template failed: template: partials/seo_tags.html:61:22: executing โ€œpartials/seo_tags.htmlโ€ at <partial โ€œfunctions/get_featured_image.htmlโ€ .>: error calling partial: โ€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core@v0.1.0/layouts/partials/functions/get_featured_image.html:18:54โ€: execute of template failed: template: partials/functions/get_featured_image.html:18:54: executing โ€œpartials/functions/get_featured_image.htmlโ€ at <$filename>: invalid value; expected string
10:14:53 AM: ERROR 2022/12/17 16:14:53 render of โ€œtermโ€ failed: execute of template failed: template: _default/list.html:7:3: executing โ€œ_default/list.htmlโ€ at <partial โ€œsite_headโ€ .>: error calling partial: execute of template failed: template: partials/site_head.html:174:5: executing โ€œpartials/site_head.htmlโ€ at <partial โ€œwowchemy_seoโ€ .>: error calling partial: execute of template failed: template: partials/wowchemy_seo.html:6:3: executing โ€œpartials/wowchemy_seo.htmlโ€ at <partial โ€œseo_tagsโ€ .>: error calling partial: execute of template failed: template: partials/seo_tags.html:61:22: executing โ€œpartials/seo_tags.htmlโ€ at <partial โ€œfunctions/get_featured_image.htmlโ€ .>: error calling partial: โ€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core@v0.1.0/layouts/partials/functions/get_featured_image.html:18:54โ€: execute of template failed: template: partials/functions/get_featured_image.html:18:54: executing โ€œpartials/functions/get_featured_image.htmlโ€ at <$filename>: invalid value; expected string
10:14:53 AM: ERROR 2022/12/17 16:14:53 render of โ€œtaxonomyโ€ failed: execute of template failed: template: authors/terms.html:7:3: executing โ€œauthors/terms.htmlโ€ at <partial โ€œsite_headโ€ .>: error calling partial: execute of template failed: template: partials/site_head.html:174:5: executing โ€œpartials/site_head.htmlโ€ at <partial โ€œwowchemy_seoโ€ .>: error calling partial: execute of template failed: template: partials/wowchemy_seo.html:6:3: executing โ€œpartials/wowchemy_seo.htmlโ€ at <partial โ€œseo_tagsโ€ .>: error calling partial: execute of template failed: template: partials/seo_tags.html:61:22: executing โ€œpartials/seo_tags.htmlโ€ at <partial โ€œfunctions/get_featured_image.htmlโ€ .>: error calling partial: โ€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core@v0.1.0/layouts/partials/functions/get_featured_image.html:18:54โ€: execute of template failed: template: partials/functions/get_featured_image.html:18:54: executing โ€œpartials/functions/get_featured_image.htmlโ€ at <$filename>: invalid value; expected string
10:14:53 AM: ERROR 2022/12/17 16:14:53 render of โ€œsectionโ€ failed: execute of template failed: template: section/event.html:7:3: executing โ€œsection/event.htmlโ€ at <partial โ€œsite_headโ€ .>: error calling partial: execute of template failed: template: partials/site_head.html:174:5: executing โ€œpartials/site_head.htmlโ€ at <partial โ€œwowchemy_seoโ€ .>: error calling partial: execute of template failed: template: partials/wowchemy_seo.html:6:3: executing โ€œpartials/wowchemy_seo.htmlโ€ at <partial โ€œseo_tagsโ€ .>: error calling partial: execute of template failed: template: partials/seo_tags.html:61:22: executing โ€œpartials/seo_tags.htmlโ€ at <partial โ€œfunctions/get_featured_image.htmlโ€ .>: error calling partial: โ€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core@v0.1.0/layouts/partials/functions/get_featured_image.html:18:54โ€: execute of template failed: template: partials/functions/get_featured_image.html:18:54: executing โ€œpartials/functions/get_featured_image.htmlโ€ at <$filename>: invalid value; expected string
10:14:53 AM: Error: Error building site: failed to render pages: render of โ€œtaxonomyโ€ failed: execute of template failed: template: _default/list.html:7:3: executing โ€œ_default/list.htmlโ€ at <partial โ€œsite_headโ€ .>: error calling partial: execute of template failed: template: partials/site_head.html:174:5: executing โ€œpartials/site_head.htmlโ€ at <partial โ€œwowchemy_seoโ€ .>: error calling partial: execute of template failed: template: partials/wowchemy_seo.html:6:3: executing โ€œpartials/wowchemy_seo.htmlโ€ at <partial โ€œseo_tagsโ€ .>: error calling partial: execute of template failed: template: partials/seo_tags.html:61:22: executing โ€œpartials/seo_tags.htmlโ€ at <partial โ€œfunctions/get_featured_image.htmlโ€ .>: error calling partial: โ€œ/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core@v0.1.0/layouts/partials/functions/get_featured_image.html:18:54โ€: execute of template failed: template: partials/functions/get_featured_image.html:18:54: executing โ€œpartials/functions/get_featured_image.htmlโ€ at <$filename>: invalid value; expected string
10:14:53 AM: Total in 10683 ms
10:14:53 AM: โ€‹
10:14:53 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:53 AM: โ€œbuild.commandโ€ failed
10:14:53 AM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
10:14:53 AM: โ€‹
10:14:53 AM: Error message
10:14:53 AM: Command failed with exit code 255: hugo --gc --minify -b $URL (Search results for '"non-zero exit code: 255"' - Netlify Support Forums)
10:14:53 AM: โ€‹
10:14:53 AM: Error location
10:14:53 AM: In build.command from netlify.toml:
10:14:53 AM: hugo --gc --minify -b $URL
10:14:53 AM: โ€‹
10:14:53 AM: Resolved config
10:14:53 AM: build:
10:14:53 AM: command: hugo --gc --minify -b $URL
10:14:53 AM: commandOrigin: config
10:14:53 AM: environment:
10:14:53 AM: - HUGO_ENV
10:14:53 AM: publish: /opt/build/repo/public
10:14:53 AM: publishOrigin: config
10:14:53 AM: plugins:
10:14:53 AM: - inputs:
10:14:53 AM: debug: true
10:14:53 AM: origin: config
10:14:53 AM: package: netlify-plugin-hugo-cache-resources
10:14:54 AM: Caching artifacts
10:14:54 AM: Started saving build plugins
10:14:54 AM: Finished saving build plugins
10:14:54 AM: Started saving pip cache
10:14:54 AM: Failed during stage โ€˜building siteโ€™: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
10:14:54 AM: Finished saving pip cache
10:14:54 AM: Started saving emacs cask dependencies
10:14:54 AM: Finished saving emacs cask dependencies
10:14:54 AM: Started saving maven dependencies
10:14:54 AM: Finished saving maven dependencies
10:14:54 AM: Started saving boot dependencies
10:14:54 AM: Finished saving boot dependencies
10:14:54 AM: Started saving rust rustup cache
10:14:54 AM: Finished saving rust rustup cache
10:14:54 AM: Started saving go dependencies
10:14:54 AM: Finished saving go dependencies
10:14:54 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:14:54 AM: Failing build: Failed to build site
10:14:55 AM: Finished processing build request in 21.766979663s

Thatโ€™s a different error unrelated to this problem. You might have to debug your siteโ€™s code for that.

I debugged the code and it does not appear to have any errors. I am confused

You need to check what value youโ€™re passing there. If youโ€™re unsure you can post about this on Wowchemy support, or on Hugo forums.

As per this:

The issue (Go binary problem) is now resolved, and users need not set the environment variable anymore.

1 Like

Thank you. I confirm this resolves the problem, so it looks like thereโ€™s a problem with the image.

It was, which has since been fixed (as mentioned above). PR here:

In the coming week, I believe the team would be working to make sure thatโ€™s an optimal way going forward. The above fix was made to make the situations better for the time being.