# Exit code 255 Error

**URL:** <https://answers.netlify.com/t/exit-code-255-error/81392>\
**Category:** Support\
**Tags:** deployment, netlify-newbie\
**Created:** [December 16, 2022, 6:54am UTC](https://answers.netlify.com/t/exit-code-255-error/81392 "2022-12-16T06:54:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![reke1608](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@reke1608](https://answers.netlify.com/u/reke1608)\
**Post date:** [December 16, 2022, 6:54am UTC](https://answers.netlify.com/t/exit-code-255-error/81392/1 "2022-12-16T06:54:47Z")

</div>

Hi,

I am having issues deploying my website. I am really new to this. Can anyone offer me assistance?

> **[Netlify App](https://app.netlify.com/sites/rainbow-jalebi-851ea3/deploys/639c1582ad388069eb3b4aae)**
>
> Start building the best web experiences in record time

---

<div class="post-metadata">

**Author:** ![SamO](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/samo/32/41847_2.png) [@SamO](https://answers.netlify.com/u/SamO)\
**Post date:** [December 16, 2022, 9:32am UTC](https://answers.netlify.com/t/exit-code-255-error/81392/2 "2022-12-16T09:32:09Z")

</div>

Hi @reke1608, welcome to the forums! 👋🏿 We’re glad you’re here. :netliconfetti:

First, have you looked through [this resource 7](https://answers.netlify.com/t/support-guide-compiled-build-and-deploy-resources-start-here/50679)? It is a compilation of all of our build and deploy resources. This is a good starting point for all build and deploy related questions and debugging.

If those resources don’t get you on the right track, can you share a bit more information about what you are trying to accomplish?

Lastly, please share these additional details so we can look into your experience further:

- the name of your build instance: “[example-jones.netlify.com 1](http://example-jones.netlify.com/)”
- your project repo
- a full copy of your latest deploy log
- what you have already tried
- any error messages you have received in your terminal window or in the developer console

Thank you so much! 🥰

---

<div class="post-metadata">

**Author:** ![reke1608](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@reke1608](https://answers.netlify.com/u/reke1608)\
**Post date:** [December 16, 2022, 3:52pm UTC](https://answers.netlify.com/t/exit-code-255-error/81392/3 "2022-12-16T15:52:28Z")

</div>

Build instance: [Netlify App](https://app.netlify.com/sites/rainbow-jalebi-851ea3/deploys/639c18da45fa4c65d7688f64)

I tried changing the hugo version and it still did not work.

Here is my project repo: [GitHub - reke1608/rekeportfolio](https://github.com/reke1608/rekeportfolio.git)

I have attached a full copy of my latest deploy log

1:06:03 AM: build-image version: 524714d1a66d1a967316f5c39465e22c77fdd56c (focal)  
1:06:03 AM: build-image tag: v4.16.0  
1:06:03 AM: buildbot version: 2956156cff73cc91029b26e56f43b4bf895eefff  
1:06:03 AM: Building without cache  
1:06:03 AM: Starting to prepare the repo for build  
1:06:04 AM: No cached dependencies found. Cloning fresh repo  
1:06:04 AM: git clone [GitHub - reke1608/rekeportfolio](https://github.com/reke1608/rekeportfolio)  
1:06:04 AM: Preparing Git Reference refs/heads/main  
1:06:04 AM: Parsing package.json dependencies  
1:06:05 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘hugo --gc --minify -b $URL’ versus ‘–gc --minify -b $URL’ in the Netlify UI  
1:06:05 AM: Section completed: initializing  
1:06:06 AM: Starting build script  
1:06:06 AM: Installing dependencies  
1:06:06 AM: Python version set to 2.7  
1:06:06 AM: Downloading and installing node v16.19.0…  
1:06:06 AM: Downloading [https://nodejs.org/dist/v16.19.0/node-v16.19.0-linux-x64.tar.xz](https://nodejs.org/dist/v16.19.0/node-v16.19.0-linux-x64.tar.xz)…  
1:06:07 AM: Computing checksum with sha256sum  
1:06:07 AM: Checksums matched!  
1:06:09 AM: Now using node v16.19.0 (npm v8.19.3)  
1:06:09 AM: Enabling node corepack  
1:06:09 AM: Started restoring cached build plugins  
1:06:09 AM: Finished restoring cached build plugins  
1:06:09 AM: Attempting ruby version 2.7.2, read from environment  
1:06:10 AM: Using ruby version 2.7.2  
1:06:10 AM: Using PHP version 8.0  
1:06:10 AM: Installing Hugo 0.108.0  
1:06:11 AM: hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended linux/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio  
1:06:11 AM: Started restoring cached go cache  
1:06:11 AM: Finished restoring cached go cache  
1:06:12 AM: go version go1.19.4 linux/amd64  
1:06:12 AM: /opt/build-bin/run-build-functions.sh: line 1034: /opt/buildhome/.gimme/env/go1.19.x.linux.amd64.env: No such file or directory  
1:06:12 AM: Detected 0 framework(s)  
1:06:12 AM: Installing missing commands  
1:06:12 AM: Verify run directory  
1:06:13 AM: ​  
1:06:13 AM: ────────────────────────────────────────────────────────────────  
1:06:13 AM: Netlify Build  
1:06:13 AM: ────────────────────────────────────────────────────────────────  
1:06:13 AM: ​  
1:06:13 AM: ❯ Version  
1:06:13 AM: @netlify/build 29.1.1  
1:06:14 AM: ​  
1:06:14 AM: ❯ Flags  
1:06:14 AM: baseRelDir: true  
1:06:14 AM: buildId: 639c18da45fa4c65d7688f62  
1:06:14 AM: deployId: 639c18da45fa4c65d7688f64  
1:06:14 AM: ​  
1:06:14 AM: ❯ Current directory  
1:06:14 AM: /opt/build/repo  
1:06:14 AM: ​  
1:06:14 AM: ❯ Config file  
1:06:14 AM: /opt/build/repo/netlify.toml  
1:06:14 AM: ​  
1:06:14 AM: ❯ Context  
1:06:14 AM: production  
1:06:14 AM: ​  
1:06:14 AM: ❯ Installing plugins  
1:06:14 AM: - netlify-plugin-hugo-cache-resources@0.2.1  
1:06:15 AM: ​  
1:06:15 AM: ❯ Loading plugins  
1:06:15 AM: - netlify-plugin-hugo-cache-resources@0.2.1 from netlify.toml  
1:06:16 AM: ​  
1:06:16 AM: ────────────────────────────────────────────────────────────────  
1:06:16 AM: 1. netlify-plugin-hugo-cache-resources (onPreBuild event)  
1:06:16 AM: ────────────────────────────────────────────────────────────────  
1:06:16 AM: ​  
1:06:16 AM: Checking if resources exist at “resources”  
1:06:16 AM: No cache found for resources folder  
1:06:17 AM: ​  
1:06:17 AM: (netlify-plugin-hugo-cache-resources onPreBuild completed in 9ms)  
1:06:17 AM: ​  
1:06:17 AM: ────────────────────────────────────────────────────────────────  
1:06:17 AM: 2. build.command from netlify.toml  
1:06:17 AM: ────────────────────────────────────────────────────────────────  
1:06:17 AM: ​  
1:06:17 AM: $ hugo --gc --minify -b $URL  
1:06:17 AM: Error: failed to download modules: binary with name “go” not found  
1:06:17 AM: Total in 1 ms  
1:06:17 AM: ​  
1:06:17 AM: ────────────────────────────────────────────────────────────────  
1:06:17 AM: “build.command” failed  
1:06:17 AM: ────────────────────────────────────────────────────────────────  
1:06:17 AM: ​  
1:06:17 AM: Error message  
1:06:17 AM: Command failed with exit code 255: hugo --gc --minify -b $URL ([Search results for '"non-zero exit code: 255"' - Netlify Support Forums](https://ntl.fyi/exit-code-255))  
1:06:17 AM: ​  
1:06:17 AM: Error location  
1:06:17 AM: In build.command from netlify.toml:  
1:06:17 AM: hugo --gc --minify -b $URL  
1:06:17 AM: ​  
1:06:17 AM: Resolved config  
1:06:17 AM: build:  
1:06:17 AM: command: hugo --gc --minify -b $URL  
1:06:17 AM: commandOrigin: config  
1:06:17 AM: environment:  
1:06:17 AM: - HUGO\_VERSION  
1:06:17 AM: - HUGO\_ENABLEGITINFO  
1:06:18 AM: Creating deploy upload records  
1:06:17 AM: - HUGO\_ENV  
1:06:17 AM: publish: /opt/build/repo/public  
1:06:17 AM: publishOrigin: config  
1:06:18 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](https://ntl.fyi/exit-code-2))  
1:06:17 AM: plugins:  
1:06:17 AM: - inputs:  
1:06:17 AM: debug: true  
1:06:17 AM: origin: config  
1:06:17 AM: package: netlify-plugin-hugo-cache-resources  
1:06:17 AM: Caching artifacts  
1:06:17 AM: Started saving build plugins  
1:06:17 AM: Finished saving build plugins  
1:06:17 AM: Started saving pip cache  
1:06:17 AM: Finished saving pip cache  
1:06:17 AM: Started saving emacs cask dependencies  
1:06:17 AM: Finished saving emacs cask dependencies  
1:06:17 AM: Started saving maven dependencies  
1:06:17 AM: Finished saving maven dependencies  
1:06:17 AM: Started saving boot dependencies  
1:06:17 AM: Finished saving boot dependencies  
1:06:17 AM: Started saving rust rustup cache  
1:06:17 AM: Finished saving rust rustup cache  
1:06:17 AM: Started saving go dependencies  
1:06:17 AM: Finished saving go dependencies  
1:06:18 AM: Build failed due to a user error: Build script returned non-zero exit code: 2  
1:06:18 AM: Failing build: Failed to build site  
1:06:18 AM: Finished processing build request in 14.90493814s

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [December 18, 2022, 12:42pm UTC](https://answers.netlify.com/t/exit-code-255-error/81392/4 "2022-12-18T12:42:01Z")

</div>

This was a Netlify error, which is now fixed:

> [@Exit code error](https://answers.netlify.com/t/81391/17):
>
> As per this: The issue (Go binary problem) is now resolved, and users need not set the environment variable anymore.
