# Error deploying Hugo blog: Command failed with exit code 255: hugo

**URL:** <https://answers.netlify.com/t/error-deploying-hugo-blog-command-failed-with-exit-code-255-hugo/40232>\
**Category:** Support\
**Tags:** deployment\
**Created:** [July 1, 2021, 11:44pm UTC](https://answers.netlify.com/t/error-deploying-hugo-blog-command-failed-with-exit-code-255-hugo/40232 "2021-07-01T23:44:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aceperceive](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@aceperceive](https://answers.netlify.com/u/aceperceive)\
**Post date:** [July 1, 2021, 11:44pm UTC](https://answers.netlify.com/t/error-deploying-hugo-blog-command-failed-with-exit-code-255-hugo/40232/1 "2021-07-01T23:44:40Z")

</div>

Hi,

I’m a novice, and so my apologies if this post isn’t as good as it should be.

I would really appreciate some help with deploying the Papermod Hugo template from my Github repo to Netlify.

I managed to deploy the standard version of the template, but I’m having trouble deploying the template with the example content populated.

Below is a copy of the deployment log.

Here is a link to the Github repo: [https://github.com/chrisg986/papermod3.git](https://github.com/chrisg986/papermod3.git)

The Netlify site name is dazzling-dijkstra-1240e9

Many thanks for any assistance with this. I tried to tinker with the netlify.toml file and did a huge amount of Googling, but I can’t figure it out!

The error log is as follows:

12:31:42 AM: Build ready to start  
12:31:45 AM: build-image version: 3802cb5fb68688f5cbd80f2e312aa0ce78813b3a  
12:31:45 AM: build-image tag: v4.0.4  
12:31:45 AM: buildbot version: b7aeb2675f82192daa8545b22bebab9c3b179d0e  
12:31:45 AM: Fetching cached dependencies  
12:31:45 AM: Failed to fetch cache, continuing with build  
12:31:45 AM: Starting to prepare the repo for build  
12:31:45 AM: No cached dependencies found. Cloning fresh repo  
12:31:45 AM: git clone [https://github.com/chrisg986/papermod3](https://github.com/chrisg986/papermod3)  
12:31:46 AM: Preparing Git Reference refs/heads/master  
12:31:47 AM: Parsing package.json dependencies  
12:31:47 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘hugo’ versus ‘hugo --gc --minify -b $URL’ in the Netlify UI  
12:31:47 AM: Starting build script  
12:31:47 AM: Installing dependencies  
12:31:47 AM: Python version set to 2.7  
12:31:48 AM: v12.18.0 is already installed.  
12:31:49 AM: Now using node v12.18.0 (npm v6.14.4)  
12:31:49 AM: Started restoring cached build plugins  
12:31:49 AM: Finished restoring cached build plugins  
12:31:49 AM: Attempting ruby version 2.7.2, read from environment  
12:31:50 AM: Using ruby version 2.7.2  
12:31:51 AM: Using PHP version 7.4  
12:31:51 AM: Installing Hugo 0.78.0  
12:31:52 AM: Hugo Static Site Generator v0.78.0-FD62817B/extended linux/amd64 BuildDate: 2020-11-03T13:22:37Z  
12:31:52 AM: Started restoring cached go cache  
12:31:52 AM: Finished restoring cached go cache  
12:31:52 AM: go version go1.14.4 linux/amd64  
12:31:52 AM: go version go1.14.4 linux/amd64  
12:31:52 AM: Installing missing commands  
12:31:52 AM: Verify run directory  
12:31:53 AM: ​  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: Netlify Build  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: ​  
12:31:53 AM: ❯ Version  
12:31:53 AM: @netlify/build 12.26.0  
12:31:53 AM: ​  
12:31:53 AM: ❯ Flags  
12:31:53 AM: deployId: 60de505e633fd500074bc191  
12:31:53 AM: ​  
12:31:53 AM: ❯ Current directory  
12:31:53 AM: /opt/build/repo  
12:31:53 AM: ​  
12:31:53 AM: ❯ Config file  
12:31:53 AM: /opt/build/repo/netlify.toml  
12:31:53 AM: ​  
12:31:53 AM: ❯ Context  
12:31:53 AM: production  
12:31:53 AM: ​  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: 1. build.command from netlify.toml  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: ​  
12:31:53 AM: $ hugo  
12:31:53 AM: WARN 2021/07/01 23:31:53 Module “hugo-PaperMod” is not compatible with this Hugo version; run “hugo mod graph” for more information.  
12:31:53 AM: Start building sites …  
12:31:53 AM: ERROR 2021/07/01 23:31:53 render of “page” failed: execute of template failed: template: \_default/single.html:5:8: executing “\_default/single.html” at \<partial “head.html” .\>: error calling partial: execute of template failed: template: partials/templates/opengraph.html:45:17: executing “partials/templates/opengraph.html” at \<index $siteSeries ($name | urlize)\>: error calling index: index of untyped nil  
12:31:53 AM: ERROR 2021/07/01 23:31:53 render of “page” failed: execute of template failed: template: \_default/single.html:5:8: executing “\_default/single.html” at \<partial “head.html” .\>: error calling partial: execute of template failed: template: partials/templates/opengraph.html:45:17: executing “partials/templates/opengraph.html” at \<index $siteSeries ($name | urlize)\>: error calling index: index of untyped nil  
12:31:53 AM: ERROR 2021/07/01 23:31:53 render of “page” failed: execute of template failed: template: \_default/single.html:5:8: executing “\_default/single.html” at \<partial “head.html” .\>: error calling partial: execute of template failed: template: partials/templates/opengraph.html:45:17: executing “partials/templates/opengraph.html” at \<index $siteSeries ($name | urlize)\>: error calling index: index of untyped nil  
12:31:53 AM: Total in 530 ms  
12:31:53 AM: Error: Error building site: failed to render pages: render of “page” failed: execute of template failed: template: \_default/single.html:5:8: executing “\_default/single.html” at \<partial “head.html” .\>: error calling partial: execute of template failed: template: partials/templates/opengraph.html:45:17: executing “partials/templates/opengraph.html” at \<index $siteSeries ($name | urlize)\>: error calling index: index of untyped nil  
12:31:53 AM: ​  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: “build.command” failed  
12:31:53 AM: ────────────────────────────────────────────────────────────────  
12:31:53 AM: ​  
12:31:53 AM: Error message  
12:31:53 AM: Command failed with exit code 255: hugo  
12:31:53 AM: ​  
12:31:53 AM: Error location  
12:31:53 AM: In build.command from netlify.toml:  
12:31:53 AM: hugo  
12:31:53 AM: ​  
12:31:53 AM: Resolved config  
12:31:53 AM: build:  
12:31:53 AM: command: hugo  
12:31:53 AM: commandOrigin: config  
12:31:53 AM: environment:  
12:31:53 AM: - HUGO\_VERSION  
12:31:53 AM: - HUGO\_ENV  
12:31:53 AM: publish: /opt/build/repo/public  
12:31:53 AM: publishOrigin: config  
12:31:53 AM: functions:  
12:31:53 AM: ‘\*’: {}  
12:31:54 AM: Caching artifacts  
12:31:54 AM: Started saving build plugins  
12:31:54 AM: Finished saving build plugins  
12:31:54 AM: Started saving pip cache  
12:31:54 AM: Finished saving pip cache  
12:31:54 AM: Started saving emacs cask dependencies  
12:31:54 AM: Finished saving emacs cask dependencies  
12:31:54 AM: Started saving maven dependencies  
12:31:54 AM: Finished saving maven dependencies  
12:31:54 AM: Started saving boot dependencies  
12:31:54 AM: Finished saving boot dependencies  
12:31:54 AM: Started saving rust rustup cache  
12:31:54 AM: Finished saving rust rustup cache  
12:31:54 AM: Started saving go dependencies  
12:31:54 AM: Finished saving go dependencies  
12:31:56 AM: Build failed due to a user error: Build script returned non-zero exit code: 2  
12:31:56 AM: Creating deploy upload records  
12:31:56 AM: Failing build: Failed to build site  
12:31:56 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2  
12:31:56 AM: Finished processing build request in 11.697498872s

---

<div class="post-metadata">

**Author:** ![coelmay](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/coelmay/32/24427_2.png) [@coelmay](https://answers.netlify.com/u/coelmay)\
**Post date:** [July 2, 2021, 1:23am UTC](https://answers.netlify.com/t/error-deploying-hugo-blog-command-failed-with-exit-code-255-hugo/40232/2 "2021-07-02T01:23:24Z")

</div>

Hi @aceperceive

In your `netlify.toml` you have

```auto
[context.production.environment]
  HUGO_VERSION = "0.78.0"
  HUGO_ENV = "production"

```

however the repository you have cloned from ([GitHub - adityatelange/hugo-PaperMod: A fast, clean, responsive Hugo theme.](https://github.com/adityatelange/hugo-PaperMod)) has v0.82.0 as minimum

[![Minimum Hugo Version](https://global.discourse-cdn.com/netlify/original/3X/3/b/3b0eea220eb6dde20b3eca2b935d6460dc722fff.svg)](https://github.com/gohugoio/hugo/releases/tag/v0.82.0)
