Hi all,
Started a new Github-stored Netlify deploy using Hugo Academic and it ran fine a few times, now I’m getting failed deploys and it looks as though it is linked to a problem with the path going to “public” folder or something with one of the publication pages built using Academic. Any thoughts where I should start? Thanks
Build log:
12:03:08 AM: Build ready to start
12:12:57 AM: build-image version: 653805ca4a64301556e56dc4b321ef8fc20cbb7c
12:12:57 AM: build-image tag: v3.8.2
12:12:57 AM: buildbot version: 5ca46ad10ed1b3bf6d683d62872e59029498e5a4
12:12:57 AM: Fetching cached dependencies
12:12:57 AM: Starting to download cache of 159.7MB
12:12:59 AM: Finished downloading cache in 1.289637813s
12:12:59 AM: Starting to extract cache
12:13:02 AM: Finished extracting cache in 3.152818299s
12:13:02 AM: Finished fetching cache in 4.483148002s
12:13:02 AM: Starting to prepare the repo for build
12:13:03 AM: Preparing Git Reference refs/heads/master
12:13:05 AM: Parsing package.json dependencies
12:13:06 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public’ versus ‘/’ in the Netlify UI
12:13:06 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘hugo --gc --minify -b $URL’ versus ‘’ in the Netlify UI
12:13:06 AM: Starting build script
12:13:06 AM: Installing dependencies
12:13:06 AM: Python version set to 2.7
12:13:06 AM: Started restoring cached node version
12:13:09 AM: Finished restoring cached node version
12:13:10 AM: v12.18.0 is already installed.
12:13:10 AM: Now using node v12.18.0 (npm v6.14.4)
12:13:10 AM: Started restoring cached build plugins
12:13:10 AM: Finished restoring cached build plugins
12:13:10 AM: Attempting ruby version 2.7.2, read from environment
12:13:12 AM: Using ruby version 2.7.2
12:13:12 AM: Using PHP version 5.6
12:13:12 AM: Installing Hugo 0.84.4
12:13:12 AM: hugo v0.84.4-020E4ACE+extended linux/amd64 BuildDate=2021-07-01T11:51:55Z VendorInfo=gohugoio
12:13:12 AM: Started restoring cached go cache
12:13:12 AM: Finished restoring cached go cache
12:13:12 AM: go version go1.14.4 linux/amd64
12:13:12 AM: go version go1.14.4 linux/amd64
12:13:12 AM: Installing missing commands
12:13:12 AM: Verify run directory
12:13:13 AM:
12:13:13 AM: ────────────────────────────────────────────────────────────────
12:13:13 AM: Netlify Build
12:13:13 AM: ────────────────────────────────────────────────────────────────
12:13:13 AM:
12:13:13 AM: ❯ Version
12:13:13 AM: @netlify/build 16.2.1
12:13:13 AM:
12:13:13 AM: ❯ Flags
12:13:13 AM: deployId: 60fe5e2c2fddf9c9af3ea853
12:13:13 AM:
12:13:13 AM: ❯ Current directory
12:13:13 AM: /opt/build/repo
12:13:13 AM:
12:13:13 AM: ❯ Config file
12:13:13 AM: /opt/build/repo/netlify.toml
12:13:13 AM:
12:13:13 AM: ❯ Context
12:13:13 AM: production
12:13:13 AM:
12:13:13 AM: ❯ Loading plugins
12:13:13 AM: - netlify-plugin-hugo-cache-resources@0.2.1 from netlify.toml
12:13:13 AM:
12:13:13 AM: ──────────────────────────────────────────────────────────────────
12:13:13 AM: 1. onPreBuild command from netlify-plugin-hugo-cache-resources
12:13:13 AM: ──────────────────────────────────────────────────────────────────
12:13:13 AM:
12:13:14 AM: Checking if resources exist at “resources”
12:13:14 AM: Restored cached resources folder. Total files: 2
12:13:14 AM: —
12:13:14 AM: 1. /opt/build/repo/resources
12:13:14 AM: 2. /opt/build/repo/resources/_gen
12:13:14 AM:
12:13:14 AM: (netlify-plugin-hugo-cache-resources onPreBuild completed in 247ms)
12:13:14 AM:
12:13:14 AM: ────────────────────────────────────────────────────────────────
12:13:14 AM: 2. build.command from netlify.toml
12:13:14 AM: ────────────────────────────────────────────────────────────────
12:13:14 AM:
12:13:14 AM: $ hugo --gc --minify -b $URL
12:13:14 AM: Start building sites …
12:13:14 AM: hugo v0.84.4-020E4ACE+extended linux/amd64 BuildDate=2021-07-01T11:51:55Z VendorInfo=gohugoio
12:13:14 AM: Total in 175 ms
12:13:14 AM: Error: Error building site: “/opt/build/repo/content/publication/latner-evolutionary-2020/index.md:4:1”: failed to unmarshal YAML: yaml: line 3: mapping values are not allowed in this context
12:13:14 AM:
12:13:14 AM: ────────────────────────────────────────────────────────────────
12:13:14 AM: “build.command” failed
12:13:14 AM: ────────────────────────────────────────────────────────────────
12:13:14 AM:
12:13:14 AM: Error message
12:13:14 AM: Command failed with exit code 255: hugo --gc --minify -b $URL
12:13:14 AM:
12:13:14 AM: Error location
12:13:14 AM: In build.command from netlify.toml:
12:13:14 AM: hugo --gc --minify -b $URL
12:13:14 AM:
12:13:14 AM: Resolved config
12:13:14 AM: build:
12:13:14 AM: command: hugo --gc --minify -b $URL
12:13:14 AM: commandOrigin: config
12:13:14 AM: environment:
12:13:14 AM: - HUGO_VERSION
12:13:14 AM: - HUGO_ENABLEGITINFO
12:13:14 AM: - HUGO_ENV
12:13:14 AM: publish: /opt/build/repo/public
12:13:14 AM: publishOrigin: config
12:13:14 AM: plugins:
12:13:14 AM: - inputs:
12:13:14 AM: debug: true
12:13:14 AM: origin: config
12:13:14 AM: package: netlify-plugin-hugo-cache-resources
12:13:14 AM: Caching artifacts
12:13:14 AM: Started saving build plugins
12:13:14 AM: Finished saving build plugins
12:13:14 AM: Started saving pip cache
12:13:14 AM: Finished saving pip cache
12:13:14 AM: Started saving emacs cask dependencies
12:13:14 AM: Finished saving emacs cask dependencies
12:13:14 AM: Started saving maven dependencies
12:13:14 AM: Finished saving maven dependencies
12:13:14 AM: Started saving boot dependencies
12:13:15 AM: Finished saving boot dependencies
12:13:15 AM: Started saving rust rustup cache
12:13:15 AM: Finished saving rust rustup cache
12:13:15 AM: Started saving go dependencies
12:13:15 AM: Finished saving go dependencies
12:13:15 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:13:15 AM: Creating deploy upload records
12:13:15 AM: Failing build: Failed to build site
12:13:15 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
12:13:15 AM: Finished processing build request in 17.565168131s