Deploy Failed

I’m a newbie here. Just learn how to deploy the first project with Hugo on Netlify. Below are errors that I’ve got.

7:36:51 PM: Build ready to start
7:36:52 PM: Fetching cached dependencies
7:36:52 PM: Starting to download cache of 254.8KB
7:36:52 PM: Finished downloading cache in 120.353169ms
7:36:52 PM: Starting to extract cache
7:36:52 PM: Failed to fetch cache, continuing with build
7:36:52 PM: Starting to prepare the repo for build
7:36:53 PM: No cached dependencies found. Cloning fresh repo
7:36:53 PM: git clone git@github.com:jenwit/myhugoproject
7:36:53 PM: Preparing Git Reference refs/heads/master
7:36:54 PM: Starting build script
7:36:54 PM: Installing dependencies
7:36:55 PM: Downloading and installing node v8.11.3…
7:36:55 PM: Downloading https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz
7:36:55 PM:

7:36:55 PM: 2.9%
7:36:55 PM:
##############
7:36:55 PM: 20.2%
7:36:55 PM:
##################################### 52.4%
7:36:55 PM:
#####################################################################
7:36:56 PM: ### 100.0%
7:36:56 PM: Computing checksum with sha256sum
7:36:56 PM: Checksums matched!
7:36:58 PM: Now using node v8.11.3 (npm v5.6.0)
7:36:58 PM: Attempting ruby version 2.3.6, read from environment
7:36:59 PM: Using ruby version 2.3.6
7:36:59 PM: Using PHP version 5.6
7:36:59 PM: Installing Hugo 0.42.2
7:37:02 PM: Started restoring cached go cache
7:37:02 PM: Finished restoring cached go cache
7:37:02 PM: unset GOOS;
7:37:02 PM: unset GOARCH;
7:37:02 PM: export GOROOT=’/opt/buildhome/.gimme/versions/go1.10.linux.amd64’;
7:37:02 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
7:37:02 PM: go version >&2;
7:37:02 PM: export GIMME_ENV=’/opt/buildhome/.gimme/env/go1.10.linux.amd64.env’;
7:37:02 PM: go version go1.10 linux/amd64
7:37:02 PM: Installing missing commands
7:37:02 PM: Verify run directory
7:37:02 PM: Executing user command: hugo
7:37:02 PM: Building sites …
7:37:02 PM:
Total in 0 ms
7:37:02 PM: Error: Error building site: readDir: open /opt/build/repo/content: no such file or directory
7:37:02 PM: Caching artifacts
7:37:02 PM: Started saving pip cache
7:37:02 PM: Finished saving pip cache
7:37:02 PM: Started saving emacs cask dependencies
7:37:02 PM: Finished saving emacs cask dependencies
7:37:02 PM: Started saving maven dependencies
7:37:02 PM: Finished saving maven dependencies
7:37:02 PM: Started saving boot dependencies
7:37:02 PM: Finished saving boot dependencies
7:37:02 PM: Started saving go dependencies
7:37:02 PM: Finished saving go dependencies
7:37:03 PM: Cached node version v8.11.3
7:37:03 PM: Error running command: Build script returned non-zero exit code: 255
7:37:03 PM: Failing build: Failed to build site
7:37:03 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 255
7:37:03 PM: Finished processing build request in 11.006866236s

Did you set up your Netlify project to use Hugo? Because here in the log Netlify downloads and uses Node, Ruby, and PHP, and none of those are needed with Hugo.

I suspect your Netlify project tries to build a Hugo website with other software than Hugo.

I believe Netlify installs those things for its internal stuff… you will find the “installing Hugo” command at the end of all those other installs.

1 Like

This seems to be the meat of the issue… the OP probably hasn’t committed the content dir.

Just confirmed that – See https://github.com/jenwit/myhugoproject ; content/ is not committed to the repo.

@jenwit

1 Like

Thank you very much kaushalmodi. It works now!

Not sure why you would put this in content… but OK :slight_smile:

I’m going to take a stab and guess that as a beginner, @jenwit doesn’t know about .gitkeep and wanted to put something up there maybe? If so, @jenwit, you can remove the dummy text file and replace it with a system file title .gitkeep (or even .keep, I believe) so that git will check in your otherwise empty directory. HTH:)

You’re right rdwatters! I just learn from you that I should use .gitkeep. Thanks! :slight_smile:

1 Like

Thank you! you really save me.

1 Like