Hi Team,
I am getting the following build error while deploying Hugo app on Netlify. I am very new to Hugo and Netlify and must have made some errors somewhere. This works just fine on localhost, however it fails while deploying on Netlify. Please note, I am using βhttps://themes.gohugo.io/academia-hugo/β theme to be specific. Any suggestions are highly appreciated.
Thanks,
Pranav
10:59:46 AM: Build ready to start
10:59:48 AM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
10:59:48 AM: build-image tag: v3.3.19
10:59:48 AM: buildbot version: 2cc7ea668a3e8f63326d15aab17e62cd1997fa2e
10:59:48 AM: Fetching cached dependencies
10:59:48 AM: Starting to download cache of 254.7KB
10:59:48 AM: Finished downloading cache in 68.636413ms
10:59:48 AM: Starting to extract cache
10:59:48 AM: Failed to fetch cache, continuing with build
10:59:48 AM: Starting to prepare the repo for build
10:59:48 AM: No cached dependencies found. Cloning fresh repo
10:59:48 AM: git clone https://github.com/Pranavbawa/portfolio2
10:59:49 AM: Preparing Git Reference refs/heads/master
10:59:51 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'hugo --gc --minify' versus '"hugo --gc --minify"' in the Netlify UI
10:59:51 AM: Starting build script
10:59:51 AM: Installing dependencies
10:59:51 AM: Python version set to 2.7
10:59:52 AM: v12.18.0 is already installed.
10:59:52 AM: Now using node v12.18.0 (npm v6.14.4)
10:59:53 AM: Started restoring cached build plugins
10:59:53 AM: Finished restoring cached build plugins
10:59:53 AM: Attempting ruby version 2.7.1, read from environment
10:59:54 AM: Using ruby version 2.7.1
10:59:54 AM: Using PHP version 5.6
10:59:54 AM: 5.2 is already installed.
10:59:54 AM: Using Swift version 5.2
10:59:54 AM: Installing Hugo 0.55.0
10:59:56 AM: Hugo Static Site Generator v0.55.0-4333CC77F/extended linux/amd64 BuildDate: 2019-04-08T17:05:23Z
10:59:56 AM: Started restoring cached go cache
10:59:56 AM: Finished restoring cached go cache
10:59:56 AM: go version go1.14.4 linux/amd64
10:59:56 AM: go version go1.14.4 linux/amd64
10:59:56 AM: Installing missing commands
10:59:56 AM: Verify run directory
10:59:57 AM: β
10:59:57 AM: βββββββββββββββββββββββββββββββ
10:59:57 AM: β Netlify Build β
10:59:57 AM: βββββββββββββββββββββββββββββββ
10:59:57 AM: β
10:59:57 AM: β― Version
10:59:57 AM: @netlify/build 2.0.25
10:59:57 AM: β
10:59:57 AM: β― Flags
10:59:57 AM: deployId: 5f04b812b3afe565edb5fac0
10:59:57 AM: mode: buildbot
10:59:57 AM: β
10:59:57 AM: β― Current directory
10:59:57 AM: /opt/build/repo
10:59:57 AM: β
10:59:57 AM: β― Config file
10:59:57 AM: /opt/build/repo/netlify.toml
10:59:57 AM: β
10:59:57 AM: β― Context
10:59:57 AM: production
10:59:57 AM: β
10:59:57 AM: ββββββββββββββββββββββββββββββββββββββ
10:59:57 AM: β 1. build.command from netlify.toml β
10:59:57 AM: ββββββββββββββββββββββββββββββββββββββ
10:59:57 AM: β
10:59:57 AM: $ hugo --gc --minify
10:59:57 AM: Building sites β¦ Total in 1 ms
10:59:57 AM: Error: Error building site: open /opt/build/repo/content: no such file or directory
10:59:57 AM: β
10:59:57 AM: βββββββββββββββββββββββββββββββ
10:59:57 AM: β "build.command" failed β
10:59:57 AM: βββββββββββββββββββββββββββββββ
10:59:57 AM: β
10:59:57 AM: Error message
10:59:57 AM: Command failed with exit code 255: hugo --gc --minify
10:59:57 AM: β
10:59:57 AM: Error location
10:59:57 AM: In build.command from netlify.toml:
10:59:57 AM: hugo --gc --minify
10:59:57 AM: β
10:59:57 AM: Resolved config
10:59:57 AM: build:
10:59:57 AM: command: hugo --gc --minify
10:59:57 AM: commandOrigin: config
10:59:57 AM: environment:
10:59:57 AM: - HUGO_VERSION
10:59:57 AM: - HUGO_ENV
10:59:57 AM: - HUGO_ENABLEGITINFO
10:59:57 AM: publish: /opt/build/repo/public
10:59:57 AM: Caching artifacts
10:59:57 AM: Started saving build plugins
10:59:57 AM: Finished saving build plugins
10:59:57 AM: Started saving pip cache
10:59:57 AM: Finished saving pip cache
10:59:57 AM: Started saving emacs cask dependencies
10:59:57 AM: Finished saving emacs cask dependencies
10:59:57 AM: Started saving maven dependencies
10:59:57 AM: Finished saving maven dependencies
10:59:57 AM: Started saving boot dependencies
10:59:57 AM: Finished saving boot dependencies
10:59:57 AM: Started saving go dependencies
10:59:57 AM: Finished saving go dependencies
11:00:00 AM: Error running command: Build script returned non-zero exit code: 1
11:00:00 AM: Failing build: Failed to build site
11:00:00 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
11:00:00 AM: Finished processing build request in 11.720149997s