I’m editing /layouts/tags (tags.html and terms.html). Whenever I save either file while the Hugo server is running to preview the site, the server crashes with the error shown below.
The crash happens even if the file is empty or contains only a simple “hello”. Any save to tags.html or terms.html inside /layouts/tags causes the server to fail; editing files outside that directory does not trigger the issue.
This started today, it may be related to the 0.160.0 update. Any advice would be appreciated. Thank you.
Change detected, rebuilding site (#1).
2026-04-08 03:33:52.059 +0100
Template changed /tags/list.html
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Total in 3 ms
panic: template /tags/list.html not parsed
goroutine 52 [running]:
github.com/gohugoio/hugo/tpl/tplimpl.applyTemplateTransformers(0x29227ba0c140, 0x29227c020408, 0x3395230)
github.com/gohugoio/hugo/tpl/tplimpl/templatetransform.go:84 +0x2d3
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates-range1(0x29227ba0c140)
github.com/gohugoio/hugo/tpl/tplimpl/templatestore.go:1918 +0x97
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates.(*TemplateStore).transformTemplates.(*TemplateStore).templates.func2-range2({0x1?, 0x29227b6926a0?}, 0x10cb7e5?)
github.com/gohugoio/hugo/tpl/tplimpl/templatestore.go:1765 +0xb5
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates.(*TemplateStore).transformTemplates.(*TemplateStore).templates.func2.(*TemplateStore).transformTemplates.(*TemplateStore).transformTemplates.(*TemplateStore).templates.func2.(*SimpleTree[...]).All.func3.func4(0xa?)
github.com/gohugoio/hugo/hugolib/doctree/simpletree.go:111 +0x28
github.com/gohugoio/go-radix.WalkFn[...].Handle(...)
github.com/gohugoio/go-radix@v1.2.0/radix.go:43
github.com/gohugoio/go-radix.recursiveWalk[...](0x29227c302420, {0x33d9970, 0x29227bae6280})
github.com/gohugoio/go-radix@v1.2.0/radix.go:604 +0x85
github.com/gohugoio/go-radix.recursiveWalk[...](0x29227c1775c0, {0x33d9970, 0x29227bae6280})
github.com/gohugoio/go-radix@v1.2.0/radix.go:622 +0x156
github.com/gohugoio/go-radix.recursiveWalk[...](0x29227c176330, {0x33d9970, 0x29227bae6280})
github.com/gohugoio/go-radix@v1.2.0/radix.go:622 +0x156
github.com/gohugoio/go-radix.(*Tree[...]).Walk(...)
github.com/gohugoio/go-radix@v1.2.0/radix.go:504
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates.(*TemplateStore).transformTemplates.(*TemplateStore).templates.func2.(*SimpleTree[...]).All.func3(...)
github.com/gohugoio/hugo/hugolib/doctree/simpletree.go:116
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates.(*TemplateStore).templates.func2(...)
github.com/gohugoio/hugo/tpl/tplimpl/templatestore.go:1756
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).transformTemplates(0x29227c020408)
github.com/gohugoio/hugo/tpl/tplimpl/templatestore.go:1910 +0x1bf
github.com/gohugoio/hugo/tpl/tplimpl.(*TemplateStore).RefreshFiles(0x29227c020408, 0x29227c368ab0)
github.com/gohugoio/hugo/tpl/tplimpl/templatestore.go:750 +0xbb
github.com/gohugoio/hugo/hugolib.(*HugoSites).processPartialFileEvents.func7()
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:1199 +0x16c
github.com/gohugoio/hugo/common/loggers.TimeTrackfn(0x29227b693190)
github.com/gohugoio/hugo/common/loggers/logger.go:394 +0x35
github.com/gohugoio/hugo/hugolib.(*HugoSites).processPartialFileEvents(0x29227c051d48, {0x33f04e0, 0x575a500}, {0x3407d70, 0x29227b96c480}, 0x29227b627280, 0x29227b693558, {0x29227c300550, 0x1, 0x2})
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:1195 +0x20b0
github.com/gohugoio/hugo/hugolib.(*HugoSites).process(0x29227c051d48, {0x33f04e0, 0x575a500}, {0x3407d70?, 0x29227b96c480?}, 0x29227b627280, 0x29227d997558, {0x29227c300550, 0x1, 0x2})
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:288 +0x265
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func6(...)
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:170
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0x29227c051d48, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0}, {0x29227c300550, ...})
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:186 +0x831
github.com/gohugoio/hugo/commands.(*hugoBuilder).rebuildSites(0x29227bfeb080, {0x29227c300550, 0x1, 0x2})
github.com/gohugoio/hugo/commands/hugobuilder.go:1160 +0x1ed
github.com/gohugoio/hugo/commands.(*hugoBuilder).handleEvents.func7(0x29227bfeb080, 0x29227c32e078)
github.com/gohugoio/hugo/commands/hugobuilder.go:949 +0x79
github.com/gohugoio/hugo/commands.(*hugoBuilder).handleEvents(0x29227bfeb080, 0x29227c481b30, 0x29227bb05f58, {0x29227c300370, 0x2, 0x2}, 0x29227c4afec0)
github.com/gohugoio/hugo/commands/hugobuilder.go:952 +0x1b85
github.com/gohugoio/hugo/commands.(*hugoBuilder).newWatcher.func2()
github.com/gohugoio/hugo/commands/hugobuilder.go:393 +0x2aa
created by github.com/gohugoio/hugo/commands.(*hugoBuilder).newWatcher in goroutine 1
github.com/gohugoio/hugo/commands/hugobuilder.go:364 +0x4d4