Issues deploying to netlify

Repository link: https://gitlab.com/shucreative/shucreative

hey I’m having some issues deploying my website to netifly, I’ve scoured google and I’m still having no luck. It works fine on internal servers using hugo.

I downloaded the theme using the hugo cmd, moved the theme into “themes” of my website folder, pushed it to gitlab with no issues. But I just cant get it to work with netlify :C

full disclosure: I am new to hugo / netlify etc and used to just use simple html files hosted by gitlab pages.

11:11:39 PM: Build ready to start
11:11:40 PM: build-image version: 42bca793ccd33055023c56c4ca8510463a56d317
11:11:40 PM: buildbot version: 15854c92f1b74f9c77ad951b5536193c76eff25e
11:11:40 PM: Fetching cached dependencies
11:11:41 PM: Failed to fetch cache, continuing with build
11:11:41 PM: Starting to prepare the repo for build
11:11:41 PM: No cached dependencies found. Cloning fresh repo
11:11:41 PM: git clone git@gitlab.com:shucreative/shucreative
11:11:43 PM: Preparing Git Reference refs/heads/master
11:11:44 PM: Found netlify.toml. Overriding site configuration
11:11:44 PM: Starting build script
11:11:44 PM: Installing dependencies
11:11:46 PM: Downloading and installing node v8.12.0...
11:11:46 PM: Downloading https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz...
11:11:46 PM:                                                           0.6%
11:11:46 PM: 
###########
11:11:46 PM:                                16.4%
11:11:46 PM: 
#####################
11:11:46 PM: ###############################                      72.6%
11:11:46 PM: 
############################
11:11:46 PM: ############################################ 100.0%
11:11:46 PM: Computing checksum with sha256sum
11:11:46 PM: Checksums matched!
11:11:49 PM: Now using node v8.12.0 (npm v6.4.1)
11:11:49 PM: Attempting ruby version 2.3.6, read from environment
11:11:50 PM: Using ruby version 2.3.6
11:11:51 PM: Using PHP version 5.6
11:11:51 PM: Installing Hugo 0.49.2
11:11:52 PM: Started restoring cached go cache
11:11:52 PM: Finished restoring cached go cache
11:11:52 PM: unset GOOS;
11:11:52 PM: unset GOARCH;
11:11:52 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
11:11:52 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
11:11:52 PM: go version >&2;
11:11:52 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
11:11:52 PM: go version go1.10 linux/amd64
11:11:52 PM: Installing missing commands
11:11:52 PM: Verify run directory
11:11:52 PM: Executing user command: hugo
11:11:52 PM: Error: Unable to find theme Directory: /opt/build/repo/themes/hugo-creative-theme
11:11:52 PM: Caching artifacts
11:11:52 PM: Started saving pip cache
11:11:52 PM: Finished saving pip cache
11:11:52 PM: Started saving emacs cask dependencies
11:11:52 PM: Finished saving emacs cask dependencies
11:11:52 PM: Started saving maven dependencies
11:11:52 PM: Finished saving maven dependencies
11:11:52 PM: Started saving boot dependencies
11:11:52 PM: Finished saving boot dependencies
11:11:52 PM: Started saving go dependencies
11:11:52 PM: Finished saving go dependencies
11:11:53 PM: Cached node version v8.12.0
11:11:53 PM: Error running command: Build script returned non-zero exit code: 255
11:11:53 PM: Failing build: Failed to build site
11:11:53 PM: failed during stage 'building site': Build script returned non-zero exit code: 255
11:11:53 PM: Finished processing build request in 12.737691352s

When deploying your site to Netlify with a theme, you have two main options:

  1. Add the theme as a git submodule, or
  2. Download a zip of the theme, unzip it, then copy the extracted files to your site and commit them

For details on each of these, see my installation options.

Note: these steps were written for a theme I made, so you will need to adapt them to your theme name, etc. I’m on my phone so I can’t translate them for you right now, but I think you will get the idea.

Tyvm for the link! Yeah that’ll be no problem to convert to the theme im using. I’m actually mobile right now as well, but I’ll try this out when I’m on my PC.

edit: It has been resolved! I couldn’t get git submodules to work so tried the download zip approach, worked like a charm.

1 Like

Glad you got the zip option to work.

What did you try for the git submodule? If you like, I can help you troubleshoot.