Panic error after updating Hugo to 0.99

I just updated my Go (1.18.2) and Hugo (0.99) and now I get this error when trying to build my site locally (hugo server):

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:*serverCmd).server.func1(0xc0002f6870) +0x6e5*commandeer).loadConfig(0xc0002f6870) +0x702, 0x1, 0x1, 0xc0002f6690, {0x642d8a0?, 0xc00038f580}, 0xc000131b40, {0x0, 0x0, 0x0}) +0x310, 0x0?, 0x0?, 0x5eb48c7?, {0x642d8a0?, 0xc00038f580?}, 0x1d0?) +0x31*serverCmd).server(0xc00038f580, 0xc000627680, {0xc000254500?, 0x4592e40?, 0xc00077fd00?}) +0x1cd*commandsBuilder).newServerCmdSignaled.func1(0xc000627680?, {0x7561268?, 0x0?, 0x0?}) +0x36*Command).execute(0xc000627680, {0x7561268, 0x0, 0x0}) +0x67c*Command).ExecuteC(0xc000787400) +0x3b4{0xc000130010, 0x1, 0x1}) +0xb4
main.main() +0x57

The funny thing is that Netlify builds my site correctly using the same versions of Go and Hugo.

Could you try to clone my repo and run hugo server to see if you can reproduce it? The site built correctly (both locally and in Netlify) using Go 1.18.1 and Hugo 0.98.

Thank you very much in advance!

I saw some GitHub issue about a regression in multihost setups, which I notice you also use.

1 Like

Any known workaround? Perhaps uninstalling and installing Go and Hugo again? I’m using Brew but I’m not sure how to do that :thinking:

Oh I just saw this: Dev server is broken in 0.99 when using the Multilingual Multihost mode · Issue #9901 · gohugoio/hugo · GitHub