Error building site after updating to Fedora 41

After update to Fedora 41 I get this error:

Error: error building site: assemble: unable to cast <nil> of type <nil> to map[string]interface{}

Version: hugo v0.126.2+extended linux/amd64 BuildDate=2024-07-18T00:00:00+00:00 VendorInfo=Fedora:0.126.2-3.fc41

You are more likely to receive a prompt and accurate response if you post a link to your project’s Git repository.

See Requesting Help.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

It was working in multiple repos before the update to Fedora 41 and now after updating, all repos fail. This is not an issue with the repo. I would appreciate anyone running Fedora 41 to respond here if they have the same issue. Thank you! :slightly_smiling_face:

Your problem is impossible to troubleshoot without access to your project.

You are welcome to share your repository privately if you wish.

I just tested with a fresh install of Fedora 41. No problems building a test site.

$ cat /etc/redhat-release 

Fedora release 41 (Forty One)

$ sudo dnf install hugo
$ hugo new site quickstart
$ cd quickstart
$ hugo new theme foo
$ echo "theme = 'foo'" >> hugo.toml
$ hugo

Start building sites … 
hugo v0.126.2+extended linux/amd64 BuildDate=2024-07-18T00:00:00+00:00 VendorInfo=Fedora:0.126.2-3.fc41


                   | EN  
-------------------+-----
  Pages            | 18  
  Paginator pages  |  0  
  Non-page files   |  1  
  Static files     |  1  
  Processed images |  0  
  Aliases          |  0  
  Cleaned          |  0  

Total in 21 ms

When you update a Linux distribution, distribution packages already installed are typically updated as well. So, if you installed Hugo from the distribution’s package repository as shown above, and then updated from Fedora 40 to Fedora 41, I suspect Hugo would have been updated from 121.2 to 126.2.

See https://packages.fedoraproject.org/pkgs/hugo/hugo/.

So… there may have been a bug fix or enhancement that changed the behavior of your existing sites. Which is why looking at your project repository would be helpful.

Still having issues several months later and would appreciate some help. Here is the code for my theme.

Note the word project. The theme alone doesn’t help at all.

mmh,

using a default hugo site and add your theme does not raise any error (at least no on windows 137.1, 139.2, 126.2 and 121.2

so it either depends on your content or your installation

you should provide a reproducable example site (as already stated before) and elaborate what that means

btw. 25d seem to be far less than several months :wink: