Initial investigation: Google is unable to index site because of tags containing noindex. Reviewed the submodule for the theme in use and that is what’s causing the meta tag value.
Ananke theme README.md says:
To run in production (e.g. to have Google Analytics show up), run HUGO_ENV=production before your build command. For example:
HUGO_ENV=production hugo
So I’ve tried this in two ways, both which results in the same errors being returned.
Option 1: Include an environment variable in the netlify deploy settings.
name: HUGO_ENV
value: production
Option 2: Change the build command from hugo to HUGO_ENV=production hugo
Doing one of these two options is the only change made to my netlify config and this breaks the deployment and gives the error below. The site currently works because I’ve reverted the change.
11:44:45 PM: Error: Error building site: TOCSS: failed to transform "ananke/css/main.css" (text/css). Check your Hugo installation; you need the extended version to build SCSS/SASS.
I am unsure how to proceed, I don’t know if it’s possible to change the hugo installation on netlify to include the extended version. There is a similar hugo forum post asking for this but the answer was just “read the install docs” and I’m still not sure if that’s something I can modify on Netlify.
Full deploy error log:
11:44:31 PM: Build ready to start
11:44:33 PM: build-image version: 9289b698a503f132b265bd089ab40ce1d6f9e65e (focal)
11:44:33 PM: build-image tag: v4.12.0
11:44:33 PM: buildbot version: 2510ae842d7cc96532da2c05a74ba836f3e7f056
11:44:33 PM: Building without cache
11:44:33 PM: Starting to prepare the repo for build
11:44:33 PM: No cached dependencies found. Cloning fresh repo
11:44:33 PM: git clone https://github.com/Greenjam94/HackerUnderDev
11:44:34 PM: Preparing Git Reference refs/heads/master
11:44:35 PM: Parsing package.json dependencies
11:44:36 PM: Starting build script
11:44:36 PM: Installing dependencies
11:44:36 PM: Python version set to 2.7
11:44:36 PM: Downloading and installing node v16.18.0...
11:44:36 PM: Downloading https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-x64.tar.xz...
11:44:37 PM: Computing checksum with sha256sum
11:44:37 PM: Checksums matched!
11:44:39 PM: Now using node v16.18.0 (npm v8.19.2)
11:44:39 PM: Started restoring cached build plugins
11:44:39 PM: Finished restoring cached build plugins
11:44:39 PM: Attempting ruby version 2.7.2, read from environment
11:44:40 PM: Using ruby version 2.7.2
11:44:40 PM: Using PHP version 8.0
11:44:40 PM: Started restoring cached go cache
11:44:40 PM: Finished restoring cached go cache
11:44:40 PM: Installing Go version 1.16.5 (requested 1.16.5)
11:44:44 PM: unset GOOS;
11:44:44 PM: unset GOARCH;
11:44:44 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64';
11:44:44 PM: export PATH="/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:${PATH}";
11:44:44 PM: go version >&2;
11:44:44 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env"
11:44:44 PM: go version go1.16.5 linux/amd64
11:44:44 PM: Installing missing commands
11:44:44 PM: Verify run directory
11:44:45 PM:
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM: Netlify Build
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM:
11:44:45 PM: ❯ Version
11:44:45 PM: @netlify/build 27.20.6
11:44:45 PM:
11:44:45 PM: ❯ Flags
11:44:45 PM: baseRelDir: true
11:44:45 PM: buildId: 634e211fda78b37883aea3ed
11:44:45 PM: deployId: 634e211fda78b37883aea3ef
11:44:45 PM:
11:44:45 PM: ❯ Current directory
11:44:45 PM: /opt/build/repo
11:44:45 PM:
11:44:45 PM: ❯ Config file
11:44:45 PM: No config file was defined: using default values.
11:44:45 PM:
11:44:45 PM: ❯ Context
11:44:45 PM: production
11:44:45 PM:
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM: 1. Build command from Netlify app
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM:
11:44:45 PM: $ hugo
11:44:45 PM: Start building sites …
11:44:45 PM: hugo v0.85.0-724D5DB5 linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
11:44:45 PM: Error: Error building site: TOCSS: failed to transform "ananke/css/main.css" (text/css). Check your Hugo installation; you need the extended version to build SCSS/SASS.
11:44:45 PM: Total in 194 ms
11:44:45 PM:
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM: "build.command" failed
11:44:45 PM: ────────────────────────────────────────────────────────────────
11:44:45 PM:
11:44:45 PM: Error message
11:44:45 PM: Command failed with exit code 255: hugo (https://ntl.fyi/exit-code-255)
11:44:45 PM:
11:44:45 PM: Error location
11:44:45 PM: In Build command from Netlify app:
11:44:45 PM: hugo
11:44:45 PM:
11:44:45 PM: Resolved config
11:44:45 PM: build:
11:44:45 PM: command: hugo
11:44:45 PM: commandOrigin: ui
11:44:45 PM: environment:
11:44:45 PM: - HUGO_ENV
11:44:45 PM: publish: /opt/build/repo/public
11:44:45 PM: publishOrigin: ui
11:44:45 PM: Caching artifacts
11:44:45 PM: Started saving build plugins
11:44:45 PM: Finished saving build plugins
11:44:45 PM: Started saving pip cache
11:44:45 PM: Finished saving pip cache
11:44:45 PM: Started saving emacs cask dependencies
11:44:46 PM: Finished saving emacs cask dependencies
11:44:46 PM: Started saving maven dependencies
11:44:46 PM: Finished saving maven dependencies
11:44:46 PM: Started saving boot dependencies
11:44:46 PM: Finished saving boot dependencies
11:44:46 PM: Started saving rust rustup cache
11:44:46 PM: Finished saving rust rustup cache
11:44:46 PM: Started saving go dependencies
11:44:46 PM: Finished saving go dependencies
11:44:46 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:44:46 PM: Creating deploy upload records
11:44:46 PM: Failing build: Failed to build site
11:44:46 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:44:47 PM: Finished processing build request in 13.939652262s