Hugo blog deployment failed

Hello,

I need some advice on deploying https://angry-keller-c36e1e.netlify.app/, which is a Hugo blog made from Hugo refresh theme.

The version of Hugo I’m using is 0.73.0 . I thought it might be because there was a mismatch of the version I was using with the version Netlify used so I updated the hugo version on netlify.toml to 0.73.0.

I also tried to correct the syntax of my config.yaml file.

It’s working on local machine but I have no clue why the templates failed to render during deployment. Anyone’s advice would be much appreciated!

6:51:41 PM: Waiting for other deploys from your team to complete
6:51:55 PM: Build ready to start
6:51:56 PM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
6:51:56 PM: build-image tag: v3.3.19
6:51:56 PM: buildbot version: 2cc7ea668a3e8f63326d15aab17e62cd1997fa2e
6:51:57 PM: Fetching cached dependencies
6:51:57 PM: Starting to download cache of 254.4KB
6:51:57 PM: Finished downloading cache in 72.87077ms
6:51:57 PM: Starting to extract cache
6:51:57 PM: Failed to fetch cache, continuing with build
6:51:57 PM: Starting to prepare the repo for build
6:51:57 PM: No cached dependencies found. Cloning fresh repo
6:51:57 PM: git clone https://github.com/YUYUMO/yuyu-blog
6:51:58 PM: Preparing Git Reference refs/heads/master
6:52:00 PM: Starting build script
6:52:01 PM: Installing dependencies
6:52:01 PM: Python version set to 2.7
6:52:02 PM: v12.18.0 is already installed.
6:52:02 PM: Now using node v12.18.0 (npm v6.14.4)
6:52:02 PM: Started restoring cached build plugins
6:52:02 PM: Finished restoring cached build plugins
6:52:02 PM: Attempting ruby version 2.7.1, read from environment
6:52:04 PM: Using ruby version 2.7.1
6:52:04 PM: Using PHP version 5.6
6:52:04 PM: 5.2 is already installed.
6:52:04 PM: Using Swift version 5.2
6:52:04 PM: Installing Hugo 0.73.0
6:52:05 PM: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64 BuildDate: 2020-06-23T16:40:09Z
6:52:05 PM: Started restoring cached go cache
6:52:05 PM: Finished restoring cached go cache
6:52:05 PM: go version go1.14.4 linux/amd64
6:52:05 PM: go version go1.14.4 linux/amd64
6:52:05 PM: Installing missing commands
6:52:05 PM: Verify run directory
6:52:06 PM: ​
6:52:06 PM: ┌─────────────────────────────┐
6:52:06 PM: │ Netlify Build │
6:52:06 PM: └─────────────────────────────┘
6:52:06 PM: ​
6:52:06 PM: ❯ Version
6:52:06 PM: @netlify/build 2.0.25
6:52:06 PM: ​
6:52:06 PM: ❯ Flags
6:52:06 PM: deployId: 5efe1eac87288b71a3dceabc
6:52:06 PM: mode: buildbot
6:52:06 PM: ​
6:52:06 PM: ❯ Current directory
6:52:06 PM: /opt/build/repo
6:52:06 PM: ​
6:52:06 PM: ❯ Config file
6:52:06 PM: /opt/build/repo/netlify.toml
6:52:06 PM: ​
6:52:06 PM: ❯ Context
6:52:06 PM: production
6:52:06 PM: ​
6:52:06 PM: ┌────────────────────────────────────┐
6:52:06 PM: │ 1. build.command from netlify.toml │
6:52:06 PM: └────────────────────────────────────┘
6:52:06 PM: ​
6:52:06 PM: $ hugo --gc --minify
6:52:06 PM: Building sites … ERROR 2020/07/02 17:52:06 render of “page” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: _default/single.html:11:35: executing “_default/single.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
6:52:06 PM: ERROR 2020/07/02 17:52:06 render of “page” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: _default/single.html:11:35: executing “_default/single.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
6:52:06 PM: ERROR 2020/07/02 17:52:06 render of “home” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: index.html:11:35: executing “index.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
6:52:06 PM: ERROR 2020/07/02 17:52:06 render of “term” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: _default/list.html:11:35: executing “_default/list.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
6:52:06 PM: Total in 72 ms
6:52:06 PM: Error: Error building site: failed to render pages: render of “page” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: _default/single.html:11:35: executing “_default/single.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
6:52:06 PM: ​
6:52:06 PM: ┌─────────────────────────────┐
6:52:06 PM: │ “build.command” failed │
6:52:06 PM: └─────────────────────────────┘
6:52:06 PM: ​
6:52:06 PM: Error message
6:52:06 PM: Command failed with exit code 255: hugo --gc --minify
6:52:06 PM: ​
6:52:06 PM: Error location
6:52:06 PM: In build.command from netlify.toml:
6:52:06 PM: hugo --gc --minify
6:52:06 PM: ​
6:52:06 PM: Resolved config
6:52:06 PM: build:
6:52:06 PM: command: hugo --gc --minify
6:52:06 PM: commandOrigin: config
6:52:06 PM: environment:
6:52:06 PM: - HUGO_VERSION
6:52:06 PM: - HUGO_ENV
6:52:06 PM: - HUGO_ENABLEGITINFO
6:52:06 PM: publish: /opt/build/repo/public
6:52:06 PM: Caching artifacts
6:52:06 PM: Started saving build plugins
6:52:06 PM: Finished saving build plugins
6:52:06 PM: Started saving pip cache
6:52:06 PM: Finished saving pip cache
6:52:06 PM: Started saving emacs cask dependencies
6:52:06 PM: Finished saving emacs cask dependencies
6:52:06 PM: Started saving maven dependencies
6:52:06 PM: Finished saving maven dependencies
6:52:06 PM: Started saving boot dependencies
6:52:07 PM: Finished saving boot dependencies
6:52:07 PM: Started saving go dependencies
6:52:07 PM: Finished saving go dependencies
6:52:09 PM: Error running command: Build script returned non-zero exit code: 1
6:52:09 PM: Failing build: Failed to build site
6:52:09 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
6:52:09 PM: Finished processing build request in 12.714511903s

Many thanks,
Phyllis

hey phyllis,

looking at your log:

6:52:06 PM: Building sites … ERROR 2020/07/02 17:52:06 render of “page” failed: “/opt/build/repo/themes/hugo-refresh/layouts/_default/baseof.html:11:35”: execute of template failed: template: _default/single.html:11:35: executing “_default/single.html” at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink

this indicates that something that is expected to be there isn’t there, for some reason - meaning, we’re trying to get the resources something is “pointing” towards, but they are nil (not there or available.)

I wonder whether these articles might be helpful: