# Non-zero exit code: 255

**URL:** <https://answers.netlify.com/t/non-zero-exit-code-255/84091>\
**Category:** Support\
**Tags:** deployment, building, hugo\
**Created:** [January 27, 2023, 8:40am UTC](https://answers.netlify.com/t/non-zero-exit-code-255/84091 "2023-01-27T08:40:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pas2fom](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/pas2fom/32/47232_2.png) [@Pas2fom](https://answers.netlify.com/u/Pas2fom)\
**Post date:** [January 27, 2023, 8:40am UTC](https://answers.netlify.com/t/non-zero-exit-code-255/84091/1 "2023-01-27T08:40:50Z")

</div>

Hi,  
netlify site name. Example: `www.tristandefommervault.com`  
GitHub repository :[https://github.com/Pas2fom/tristandefommervault.com](https://github.com/Pas2fom/tristandefommervault.com)

this is the message I get when adding a params file  
thank you

9:19:04 AM: “build.command” failed  
9:19:04 AM: ────────────────────────────────────────────────────────────────  
9:19:04 AM: ​  
9:19:04 AM: Error message  
9:19:04 AM: Command failed with exit code 255: hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL ([Search results for '"non-zero exit code: 255"' - Netlify Support Forums](https://ntl.fyi/exit-code-255))  
9:19:04 AM: ​  
9:19:04 AM: Error location  
9:19:04 AM: In build.command from netlify.toml:  
9:19:04 AM: hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL  
9:19:04 AM: ​  
9:19:04 AM: Resolved config

9:18:26 AM: Waiting for other deploys from your team to complete. Check the queue: [Netlify App](https://app.netlify.com/teams/pas2fom/builds)  
9:18:53 AM: build-image version: 1ca34a93198b041e44214013884c57d146a23fed (focal)  
9:18:53 AM: build-image tag: v4.16.4  
9:18:53 AM: buildbot version: 5d70ebdb976733297fb4c90b41002389a248e2df  
9:18:53 AM: Fetching cached dependencies  
9:18:53 AM: Starting to download cache of 133.9MB  
9:18:53 AM: Finished downloading cache in 447ms  
9:18:53 AM: Starting to extract cache  
9:18:54 AM: Finished extracting cache in 655ms  
9:18:54 AM: Finished fetching cache in 1.136s  
9:18:54 AM: Starting to prepare the repo for build  
9:18:54 AM: Preparing Git Reference pull/88/head  
9:18:55 AM: Parsing package.json dependencies  
9:18:56 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL’ versus ‘hugo --gc --minify’ in the Netlify UI  
9:18:56 AM: Starting build script  
9:18:56 AM: Installing dependencies  
9:18:56 AM: Python version set to 2.7  
9:18:56 AM: Started restoring cached Node.js version  
9:18:57 AM: Finished restoring cached Node.js version  
9:18:57 AM: v8.17.0 is already installed.  
9:18:57 AM: Now using node v8.17.0 (npm v6.13.4)  
9:18:57 AM: Started restoring cached build plugins  
9:18:57 AM: Finished restoring cached build plugins  
9:18:57 AM: Attempting Ruby version 2.6.2, read from environment  
9:18:57 AM: Started restoring cached Ruby version  
9:18:57 AM: Finished restoring cached Ruby version  
9:18:58 AM: Using Ruby version 2.6.2  
9:18:58 AM: Using PHP version 8.0  
9:18:58 AM: Installing Hugo 0.80.0  
9:18:58 AM: Hugo Static Site Generator v0.80.0-792EF0F4/extended linux/amd64 BuildDate: 2020-12-31T13:46:18Z  
9:18:58 AM: Started restoring cached go cache  
9:18:58 AM: Finished restoring cached go cache  
9:18:58 AM: Installing Go version 1.15 (requested 1.15)  
9:19:02 AM: unset GOOS;  
9:19:02 AM: unset GOARCH;  
9:19:02 AM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.15.linux.amd64’;  
9:19:02 AM: export PATH=“/opt/buildhome/.gimme/versions/go1.15.linux.amd64/bin:${PATH}”;  
9:19:02 AM: go version \>&2;  
9:19:02 AM: export GIMME\_ENV=“/opt/buildhome/.gimme/env/go1.15.linux.amd64.env”  
9:19:02 AM: go version go1.15 linux/amd64  
9:19:02 AM: Detected 2 framework(s)  
9:19:02 AM: “hugo” at version “unknown”  
9:19:02 AM: “zola” at version “unknown”  
9:19:02 AM: Installing missing commands  
9:19:02 AM: Verify run directory  
9:19:02 AM: Section completed: initializing  
9:19:03 AM: ​  
9:19:03 AM: Netlify Build  
9:19:03 AM: ────────────────────────────────────────────────────────────────  
9:19:03 AM: ​  
9:19:03 AM: ❯ Version  
9:19:03 AM: @netlify/build 29.5.1  
9:19:03 AM: ​  
9:19:03 AM: ❯ Flags  
9:19:03 AM: baseRelDir: false  
9:19:03 AM: buildId: 63d388d21749be0008eaeb66  
9:19:03 AM: deployId: 63d388d21749be0008eaeb68  
9:19:03 AM: ​  
9:19:03 AM: ❯ Current directory  
9:19:03 AM: /opt/build/repo  
9:19:03 AM: ​  
9:19:03 AM: ❯ Config file  
9:19:03 AM: /opt/build/repo/netlify.toml  
9:19:03 AM: ​  
9:19:04 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))  
9:19:03 AM: ❯ Context  
9:19:03 AM: deploy-preview  
9:19:04 AM: ​  
9:19:04 AM: 1. build.command from netlify.toml  
9:19:04 AM: ────────────────────────────────────────────────────────────────  
9:19:04 AM: ​  
9:19:04 AM: $ hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL  
9:19:04 AM: Total in 18 ms  
9:19:04 AM: Error: add site dependencies: load resources: loading templates: “/opt/build/repo/layouts/partials/work.html:613:1”: parse failed: template: partials/work.html:613: function “className” not defined  
9:19:04 AM: ​  
9:19:04 AM: “build.command” failed  
9:19:04 AM: ────────────────────────────────────────────────────────────────  
9:19:04 AM: ​  
9:19:04 AM: Error message  
9:19:04 AM: Command failed with exit code 255: hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL ([Search results for '"non-zero exit code: 255"' - Netlify Support Forums](https://ntl.fyi/exit-code-255))  
9:19:04 AM: ​  
9:19:04 AM: Error location  
9:19:04 AM: In build.command from netlify.toml:  
9:19:04 AM: hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL  
9:19:04 AM: ​  
9:19:04 AM: Resolved config  
9:19:04 AM: build:  
9:19:04 AM: command: hugo --gc --minify --buildFuture -b $DEPLOY\_PRIME\_URL  
9:19:04 AM: commandOrigin: config  
9:19:04 AM: environment:  
9:19:04 AM: - HUGO\_VERSION  
9:19:04 AM: - REVIEW\_ID  
9:19:04 AM: - RUBY\_VERSION  
9:19:04 AM: publish: /opt/build/repo/public  
9:19:04 AM: publishOrigin: config  
9:19:04 AM: Caching artifacts  
9:19:04 AM: Started saving build plugins  
9:19:04 AM: Finished saving build plugins  
9:19:04 AM: Started saving pip cache  
9:19:04 AM: Finished saving pip cache  
9:19:04 AM: Started saving emacs cask dependencies  
9:19:04 AM: Finished saving emacs cask dependencies  
9:19:04 AM: Started saving maven dependencies  
9:19:04 AM: Finished saving maven dependencies  
9:19:04 AM: Started saving boot dependencies  
9:19:04 AM: Finished saving boot dependencies  
9:19:04 AM: Started saving rust rustup cache  
9:19:04 AM: Finished saving rust rustup cache  
9:19:04 AM: Started saving go dependencies  
9:19:04 AM: Finished saving go dependencies  
9:19:04 AM: Build failed due to a user error: Build script returned non-zero exit code: 2  
9:19:04 AM: Failing build: Failed to build site  
9:19:04 AM: Finished processing build request in 11.643s  
The better the post - the faster the answer.

---

<div class="post-metadata">

**Author:** ![gualter](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/gualter/32/35068_2.png) [@gualter](https://answers.netlify.com/u/gualter)\
**Post date:** [January 27, 2023, 9:00am UTC](https://answers.netlify.com/t/non-zero-exit-code-255/84091/2 "2023-01-27T09:00:39Z")

</div>

Hello

Thank you for reporting this. We have an ingoing incident that you can follow here:

> **[New builds not starting](https://www.netlifystatus.com/incidents/bnftvx1h70rr)**
>
> Netlify's Status Page - New builds not starting.

Please bear with us while we sort this out!

---

<div class="post-metadata">

**Author:** ![gualter](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/gualter/32/35068_2.png) [@gualter](https://answers.netlify.com/u/gualter)\
**Post date:** [January 27, 2023, 9:58am UTC](https://answers.netlify.com/t/non-zero-exit-code-255/84091/3 "2023-01-27T09:58:49Z")

</div>

Hello

The issue has been solved now!
