Hugo 0.40.3 Netlify Build Error

The other day I think Netlify transistioned to Ubuntu Noble from Focal. and my site stopped deploying due to an error. I checked the build logs and it threw this error:

7:44:11 PM: mise ERROR Failed to install aqua:gohugoio/hugo/hugo-extended@0.40.3: HTTP status client error (404 Not Found) for url (https://api.github.com/repos/gohugoio/hugo/releases/tags/0.40.3): no asset found: hugo_extended_0.40.3_Linux-64bit.tar.gz

I reached out to netlify support and they suggested I set the build command manually. Below is the screenshot of that change:

So I redeployed and got the same error. Support said that there might be a configuration set on my repo thats forcing hugo-extended and they asked me to check if I had any configuration files that contained the “hugo-extended@0.40.3” command. But the config files they asked me check all sound like stuff on the build image:

  • .tool-versions

  • .mise.toml

  • mise.toml

  • .config/mise/config.toml

  • aqua.yaml or aqua.yml

Here is my current netlify.toml file:

[build]
  publish = "public"
  command = "hugo"

[build.environment]
  HUGO_VERSION = "0.40.3"
  HUGO_EXTENDED = "false"

Im wondering if I am missing anything. I can deploy from focal, but they have depreciated that build image (but itjs still working for now)…

Releases before v0.54.0 were not semantically versionsed. Or to put it another way, v0.43.0 isn’t a thing.

https://github.com/gohugoio/hugo/releases/tag/v0.43

You want this:
https://github.com/gohugoio/hugo/releases/download/v0.43/hugo_extended_0.43_Linux_64bit.deb

I think their new build image doesn’t support hugo-extended 0.43 on Noble which is why I am in this predicament.

Or maybe I am confused..

So Do I need to change my netlify.toml to hugo extended?

No, to use Netlify’s Hugo I think your simplest bet is to upgrade to a version => 0.54.0. Version 0.40 is like … 8 years old?

I know, I know. :D. I got lazy and never started an upgrade… I guess I have no choice now. :frowning: Upgrade time…

[build.environment]
HUGO_VERSION_DOWNLOAD = "0.43"
TZ = "Europe/Oslo"

[build]
publish = "public"

command = """\
  mkdir -p "${HOME}/.local/bin" && \
  curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION_DOWNLOAD}/hugo_extended_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  tar -C "${HOME}/.local/bin" -xf "hugo_extended_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  rm "hugo_extended_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  git config core.quotepath false && \
  export PATH="${HOME}/.local/bin:${PATH}" && \
  hugo --gc --baseURL "${URL}"
  """

Works fine.

Yeah that seems to work.

Can I change my netlify build command settings back to default?

It doesn’t matter. The build command is read from the netlify.toml file.

1 Like

So Netlify suggested that I remove that command and use the following instead:

[context.production.environment]
HUGO_VERSION = "0.43"
HUGO_EXTENDED = "true"
HUGO_ENV = "production"

That seemed to work.

Are you sure? This is what I see:

10:56:39 AM: build-image version: 8c9b1115cf47daa4d19510cfee34034469213d7a (noble-new-builds)
10:56:39 AM: buildbot version: c45dd31339e02bebd642dfcbf12816bab6e27e1b
10:56:39 AM: Building with cache
10:56:39 AM: Starting to prepare the repo for build
10:56:39 AM: Preparing Git Reference refs/heads/main
10:56:40 AM: Custom build command detected. Proceeding with the specified command: 'hugo'
10:56:40 AM: Installing dependencies
10:56:40 AM: mise ~/.config/mise/config.toml tools: python@3.14.3
10:56:40 AM: mise ~/.config/mise/config.toml tools: ruby@3.4.8
10:56:41 AM: mise ~/.config/mise/config.toml tools: go@1.26.0
10:56:41 AM: mise hugo-extended@0.43 [1/3] install
10:56:41 AM: mise hugo-extended@0.43 [1/3] download hugo_extended_0.43_Linux-64bit.tar.gz
10:56:42 AM: mise hugo-extended@0.43 [2/3] checksum hugo_extended_0.43_Linux-64bit.tar.gz
10:56:42 AM: mise ERROR Failed to install aqua:gohugoio/hugo/hugo-extended@0.43: Checksum mismatch for file ~/.local/share/mise/downloads/hugo-extended/0.43/hugo_extended_0.43_Linux-64bit.tar.gz:
10:56:42 AM: Expected: sha256:5e5da00419ef280557a7cb6e84483fca7515dc7712a8bfe892d790d472e83eef
10:56:42 AM: Actual:   sha256:0a3f153ebd33b722c83708048171040fa7bcd77c717fd818dc13ab1c1704c8d2
10:56:42 AM: mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
10:56:42 AM: Error during Hugo 0.43 install
10:56:42 AM: Failing build: Failed to install dependencies
10:56:42 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1

And… I misread the version in the topic title. You want 0.40.3 not 0.43…

[build.environment]
HUGO_VERSION_DOWNLOAD = "0.40.3"
TZ = "Europe/Oslo"

[build]
publish = "public"

command = """\
  mkdir -p "${HOME}/.local/bin" && \
  curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION_DOWNLOAD}/hugo_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  tar -C "${HOME}/.local/bin" -xf "hugo_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  rm "hugo_${HUGO_VERSION_DOWNLOAD}_Linux-64bit.tar.gz" && \
  git config core.quotepath false && \
  export PATH="${HOME}/.local/bin:${PATH}" && \
  hugo version && \
  hugo --gc --baseURL "${URL}"
  """

Works great.

You’re right, I forgot to push changes… talk back with netlify support. They asked me not to use that config for some reason…

So I got a response back from another tech and they said yeah this is the best solution, so I think they are getting confused some times. thanks for your help.

Im going to work on upgrading my site to 0.54 like bep said and eventually want to upgrade to the newest version too in the winter of 2026. Wish me luck Hopefully I can get by until then. :smiley:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.