# New shape of error: Build script returned non-zero exit code: 255

**URL:** <https://answers.netlify.com/t/new-shape-of-error-build-script-returned-non-zero-exit-code-255/5915>\
**Category:** Support\
**Tags:** settings-config, deployment, hugo\
**Created:** [December 6, 2019, 4:29pm UTC](https://answers.netlify.com/t/new-shape-of-error-build-script-returned-non-zero-exit-code-255/5915 "2019-12-06T16:29:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stradichenko](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/stradichenko/32/4628_2.png) [@Stradichenko](https://answers.netlify.com/u/Stradichenko)\
**Post date:** [December 6, 2019, 4:29pm UTC](https://answers.netlify.com/t/new-shape-of-error-build-script-returned-non-zero-exit-code-255/5915/1 "2019-12-06T16:29:58Z")

</div>

I created a blogwdown project using RStudio. I uploaded the academic-hugo theme in GitLab and today I tried to Deploy in Netlify, the problem is that I’m getting the following list of errors and I’m trying to proceed from here.  
I have been following other similar discussion topics but none of the solutions seem to be working so far.  
All the information is in the following thread:

> <https://github.com/wowchemy/wowchemy-hugo-themes/issues/1453>
>
> I created a blogwdown project yesterday using RStudio. I created the theme repo …in GitLab and today I tried to Deploy in Netlify, the problem is that I'm getting the following list of errors and I'm trying to proceed from here. I haven't edited any of the files and is deployed as intact as possible.
> 
> \### Describe the bug
> 
> 7:11:06 PM: Build ready to start
> 7:11:08 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
> 7:11:08 PM: build-image tag: v3.3.5
> 7:11:08 PM: buildbot version: 94178e8d3e0dd79630813c690b9aae771c4d9605
> 7:11:08 PM: Fetching cached dependencies
> 7:11:08 PM: Starting to download cache of 254.9KB
> 7:11:08 PM: Finished downloading cache in 103.915152ms
> 7:11:08 PM: Starting to extract cache
> 7:11:08 PM: Failed to fetch cache, continuing with build
> 7:11:08 PM: Starting to prepare the repo for build
> 7:11:09 PM: No cached dependencies found. Cloning fresh repo
> 7:11:09 PM: git clone git@gitlab.com:sittoche/krotanote
> 7:11:11 PM: Preparing Git Reference refs/heads/master
> 7:11:11 PM: Starting build script
> 7:11:11 PM: Installing dependencies
> 7:11:13 PM: v10.17.0 is already installed.
> 7:11:13 PM: Now using node v10.17.0 (npm v6.11.3)
> 7:11:13 PM: Attempting ruby version 2.6.2, read from environment
> 7:11:15 PM: Using ruby version 2.6.2
> 7:11:15 PM: Using PHP version 5.6
> 7:11:15 PM: Started restoring cached go cache
> 7:11:15 PM: Finished restoring cached go cache
> 7:11:15 PM: unset GOOS;
> 7:11:15 PM: unset GOARCH;
> 7:11:15 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
> 7:11:15 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
> 7:11:15 PM: go version \>&2;
> 7:11:15 PM: export GIMME\_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
> 7:11:15 PM: go version go1.12 linux/amd64
> 7:11:15 PM: Installing missing commands
> 7:11:15 PM: Verify run directory
> 7:11:15 PM: Executing user command: hugo
> \*\*7:11:15 PM: Error: "/opt/build/repo/themes/hugo-academic/layouts/partials/functions/get\_address.html:21:1": parse failed: template: partials/functions/get\_address.html:21: function "return" not defined\*\*
> 7:11:15 PM: Skipping functions preparation step: no functions directory set
> 7:11:15 PM: Caching artifacts
> 7:11:15 PM: Started saving pip cache
> 7:11:15 PM: Finished saving pip cache
> 7:11:15 PM: Started saving emacs cask dependencies
> 7:11:15 PM: Finished saving emacs cask dependencies
> 7:11:15 PM: Started saving maven dependencies
> 7:11:15 PM: Finished saving maven dependencies
> 7:11:15 PM: Started saving boot dependencies
> 7:11:15 PM: Finished saving boot dependencies
> 7:11:15 PM: Started saving go dependencies
> 7:11:15 PM: Finished saving go dependencies
> \*\*7:11:17 PM: Error running command: Build script returned non-zero exit code: 255
> 7:11:17 PM: Failing build: Failed to build site
> 7:11:17 PM: failed during stage 'building site': Build script returned non-zero exit code: 255
> 7:11:17 PM: Finished processing build request in 9.273429385s\*\*
> 
> \### Technical details:
> 
> \* Academic Version: v4.6.2 (I think, I downloaded the theme yesterday so I assume is the lastest)
> \* Hugo Version: 0.60.1
> \* Browser/OS: Chrome WINDOWS

Here’s the link of my last failed deploy:

> **[Netlify App](https://app.netlify.com/sites/eager-jang-c76b35/deploys/5dea73092ed1f60009982461)**
>
> Start building the best web experiences in record time

Thank you very much for your attention.

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [December 7, 2019, 11:47pm UTC](https://answers.netlify.com/t/new-shape-of-error-build-script-returned-non-zero-exit-code-255/5915/2 "2019-12-07T23:47:06Z")

</div>

It looks like you deleted or renamed your site so the deploy is not accessible on the link you provided. If you can provide a current working link, I can take a look.

That said, you can take a look at this [doc](https://docs.netlify.com/configure-builds/common-configurations/#hugo) which mentions a fix for that error when using hugo.

Hope that helps.
