Go panic with Tailwind v4

hugo server

panic: deferred execution with id "__hdeferred/7321320695ec2664_9c70933aff6b2a6d08c687a6cbb6b765__d=" not found

goroutine 22996 [running]:
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1.1(0xc00372ea5c?, {0xc00927c1e0, 0x41}, 0xc000159680, 0xc007c49e88, 0xc007c49ea0, 0xa5c, 0xa9d, 0xc007c49e70, 0xc007c49e47)
	/root/project/hugo/hugolib/hugo_sites_build.go:491 +0x474
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1({0xc009606e8d, 0x20})
	/root/project/hugo/hugolib/hugo_sites_build.go:525 +0x25b
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func2({0xc007c49f38?, 0xc007c49f18?}, {0xc009606e8d?, 0x0?})
	/root/project/hugo/hugolib/hugo_sites_build.go:542 +0x22
github.com/gohugoio/hugo/common/rungroup.Run[...].func1()
	/root/project/hugo/common/rungroup/rungroup.go:64 +0xbd
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/root/project/gomodcache/golang.org/x/sync@v0.11.0/errgroup/errgroup.go:78 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 19643
	/root/project/gomodcache/golang.org/x/sync@v0.11.0/errgroup/errgroup.go:75 +0x93

Might be related: panic: deferred execution with id "__hdeferred/...=" not found · Issue #13492 · gohugoio/hugo · GitHub

hugo v0.145.0-666444f0a52132f9fec9f71cf25b441cc6a4f355+extended linux/amd64 BuildDate=2025-02-26T15:41:25Z VendorInfo=gohugoio
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.24.0"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"

I have added a comment in panic: deferred execution with id "__hdeferred/...=" not found · Issue #13492 · gohugoio/hugo · GitHub

It appears to have solved the error in my end. Might need to be documented just in case.

1 Like

I have added a note in the docs: Update Defer.md · gohugoio/hugoDocs@807be5d · GitHub

I will also try to find some time to 1) Test this and 2) Throw an error if we can detect this.

1 Like

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