Hugo Error: failed to resolve “content” to a archetype template

I have been bouncing around trying out new static site generators lately and was giving Hugo a tryout. I installed on WSL through the apt package manager and got stalled on trying to create a new content item with the “Error: failed to resolve “content” to a archetype template” error. I rummaged around and found out it is because the version of Hugo in the apt repository is an old version (why?). That basically leaves you with either compiling it (which would be sort of fun) but time consuming or installing the binary from the website which turns out they have a Debian version just sitting there.

The Fix

You will probably need to look at the website to see what the most recent version is to download but for me I just copied the URL to the .deb binary and then used wget to download it to my WSL instance.

This example is using the current release as of this writing, but you should look for the latest releases at https://github.com/gohugoio/hugo/releases

Be sure to grab the extended version of Hugo and not the standard version.

wget https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_linux-amd64.deb

Once downloaded I just used dpkg to install the binary. And that was it. Fixed

sudo dpkg -i hugo_extended_0.138.0_linux-amd64.deb

And now the latest version of Hugo is installed and the examples work.

Leave a comment