You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| EN
-------------------+-----
Pages | 34
Paginator pages | 0
Non-page files | 1
Static files | 59
Processed images | 0
Aliases | 0
Cleaned | 0
Built in 839 ms
Environment: "development"
Serving pages from disk
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
Change detected, rebuilding site (#1).
2024-03-01 15:57:47.874 -0500
Total in 0 ms
panic: unknown component: "archetypes"
goroutine 86 [running]:
github.com/gohugoio/hugo/hugolib.(*HugoSites).processPartial.func3(0xc0005e4070?, 0x1?, 0x0)
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/hugolib/hugo_sites_build.go:796 +0x102b
github.com/gohugoio/hugo/hugolib.(*HugoSites).processPartial(0xc000a783c0, {0x3f09838, 0x5373ee0}, {0x3f10d50?, 0xc0000dd0e0}, 0xc00130ac80, 0xc00191b740, {0xc00178a060, 0x1, 0x1})
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/hugolib/hugo_sites_build.go:860 +0xb69
github.com/gohugoio/hugo/hugolib.(*HugoSites).process(0xc00191b740?, {0x3f09838, 0x5373ee0}, {0x3f10d50?, 0xc0000dd0e0?}, 0xc00130ac80, 0x60?, {0xc00178a060, 0x1, 0x1})
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/hugolib/hugo_sites_build.go:234 +0x15d
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func4()
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/hugolib/hugo_sites_build.go:141 +0xbd
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc000a783c0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0}, {0xc00178a060, ...})
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/hugolib/hugo_sites_build.go:152 +0x65b
github.com/gohugoio/hugo/commands.(*hugoBuilder).rebuildSites(0xc0009bec80, {0xc00178a060, 0x1, 0x1})
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/commands/hugobuilder.go:1007 +0x19b
github.com/gohugoio/hugo/commands.(*hugoBuilder).handleEvents.func6(0xc0009bec80, 0xc000123ad0)
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/commands/hugobuilder.go:859 +0x9b
github.com/gohugoio/hugo/commands.(*hugoBuilder).handleEvents(0xc0009bec80, 0xc000843500, 0xc00083a498, {0xc000590048, 0x1, 0x1}, 0x0?)
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/commands/hugobuilder.go:862 +0x13bf
github.com/gohugoio/hugo/commands.(*hugoBuilder).newWatcher.func2()
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/commands/hugobuilder.go:347 +0x25d
created by github.com/gohugoio/hugo/commands.(*hugoBuilder).newWatcher in goroutine 1
/home/username/go/pkg/mod/github.com/gohugoio/[email protected]/commands/hugobuilder.go:338 +0x4f0
error Command failed with exit code 2.
I didn't have this issue when I was running the prebuilt Hugo. That was version 0.111.3.
Steps to Reproduce
Install the Hugo version mentioned.
Setup hugo config into "divided" yml files (see the uploaded zip file) under /config/_defaultconfig.zip. It includes:
config.yml
menus.yml
params.yml
security.yml
taxonomies.yml
Setup some basic content. My project dir structure is provided above to help improve reproducability.
Startup Hugo Server using the following command (these are the options I'm using): hugo serve -D -E -F --gc --disableFastRender --cleanDestinationDir --noHTTPCache --poll 1000ms
Edit the /archetypes/default.md file - what I did was the following simple text change - from single space in the " " title replace function to two spaces, " ":
from: title: {{ replace .Name "-" " " | title }}
to: title: {{ replace .Name "-" " " | title }}
The server should crash at this point.
Things I've Tried to Do
I've deleted all archetype files including /archetypes/default.md and made an edit to a regular Page MD file and this works - hugo serverdoes not crash anymore.
If I put back the default.md file and update other content (like the /content/privacy-policy.md file), the server continues to work as expected.
If I edit the /archtetypes/default.md file (as described in the Reproduction section above), then the server crashes.
This is not a really critical bug as far as I can tell, more of an inconvenience. I'm still testing things out though - I tried running hugo new artwork/some-new-art/index.md and this works properly AND, if hugo server ... is running in a second terminal, it still doesn't crash. The only thing that is making hugo server crash is actually making any sort of edit to an archetype file.
jmooring
changed the title
Hugo server command crashes when any change made to any file in /archetypes directory. Error panic: unknown component: "archetypes".
Server panics when archetype is modified
Mar 2, 2024
What version of Hugo are you using (
hugo version
)?Hugo Version:
hugo v0.123.4+extended linux/amd64 BuildDate=unknown
(Built using golang compiler as described here: Build from source.
Does this issue reproduce with the latest release?
Yes (I'm on the latest release).
Environment
uname -a
:Linux HOSTNAME 6.7.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Feb 23 18:27:29 UTC 2024 x86_64 GNU/Linux
/home/USERNAME/www/project.name
Project File Structure
. ├── archetypes │ └── default.md ├── assets │ ├── scripts │ │ └── main.ts │ └── scss │ └── styles.scss ├── config │ └── _default │ ├── config.yml │ ├── menus.yml │ ├── params.yml │ ├── security.yml │ └── taxonomies.yml ├── content │ ├── _index.md │ ├── about.md │ ├── privacy-policy.md │ ├── terms-and-conditions.md │ ├── artwork │ │ ├── _index.md │ │ └── 2023-01-01_40x60 │ │ └── img │ │ ├── primary │ │ │ └── primary_768x1024_00.jpg │ │ └── secondary │ └── updates │ ├── _index.md │ ├── event1 │ │ └── index.md │ ├── event2 │ │ └── index.md │ └── event3 │ ├── _index.md │ └── subevent1 │ ├── event4.md │ └── event5.md ├── data │ └── .gitkeep ├── layouts │ ├── 404.html │ ├── _default │ │ ├── baseof.html │ │ ├── home.html │ │ ├── list.html │ │ └── single.html │ ├── partials │ │ └── menus │ │ ├── basic │ │ │ ├── recursion-full.html │ │ │ ├── recursion-none.html │ │ │ └── sectional.html │ │ ├── iconographic │ │ │ └── social-media.html │ │ └── special-purpose │ │ └── a11y-jump-navigation.html │ └── shortcodes ├── static │ ├── fonts │ │ ├── afacad │ │ │ ├── Afacad-SemiBold.ttf │ │ │ └── afacad-normal.css │ │ ├── fonts.css │ │ └── rem │ │ ├── REM-Black.ttf │ │ └── rem-normal.css │ └── img │ ├── galleries │ │ └── artwork │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ ├── 13.jpg │ │ ├── 14.jpg │ │ ├── 15.jpg │ │ ├── 16.jpg │ │ ├── 17.jpg │ │ ├── 18.jpg │ │ ├── 19.jpg │ │ ├── 20.jpg │ │ ├── 21.jpg │ │ ├── 22.jpg │ │ ├── 23.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ ├── 6.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ └── 9.jpg │ └── logo │ └── logo.jpg ├── themes │ └── .gitkeep ├── package.json ├── postcss.config.js ├── tailwind.config.js ├── tsconfig.json ├── vite.config.js └── yarn.lock
Error Stack
I didn't have this issue when I was running the prebuilt Hugo. That was version
0.111.3
.Steps to Reproduce
/config/_default
config.zip. It includes:hugo serve -D -E -F --gc --disableFastRender --cleanDestinationDir --noHTTPCache --poll 1000ms
/archetypes/default.md
file - what I did was the following simple text change - from single space in the " " title replace function to two spaces, " ":title: {{ replace .Name "-" " " | title }}
title: {{ replace .Name "-" " " | title }}
Things I've Tried to Do
/archetypes/default.md
and made an edit to a regular Page MD file and this works -hugo server
does not crash anymore.default.md
file and update other content (like the/content/privacy-policy.md
file), the server continues to work as expected./archtetypes/default.md
file (as described in the Reproduction section above), then the server crashes.This is not a really critical bug as far as I can tell, more of an inconvenience. I'm still testing things out though - I tried running
hugo new artwork/some-new-art/index.md
and this works properly AND, ifhugo server ...
is running in a second terminal, it still doesn't crash. The only thing that is makinghugo server
crash is actually making any sort of edit to an archetype file.Here are my two archetype files:
Please let me know if any other assistance/info is needed. Thanks!
The text was updated successfully, but these errors were encountered: