glanceapp/glance · error
page %d: width can only be either wide or slim
Error message
page %d: width can only be either wide or slim
What it means
A page's optional width setting must be one of wide, slim, or default when set. The message text mentions only wide or slim, but the code also accepts default and the empty string (unset). Any other value for the page at the given index fails validation.
Source
Thrown at internal/glance/config.go:494
return fmt.Errorf("the password for %s must be at least 6 characters", username)
}
}
if config.Server.AssetsPath != "" {
if _, err := os.Stat(config.Server.AssetsPath); os.IsNotExist(err) {
return fmt.Errorf("assets directory does not exist: %s", config.Server.AssetsPath)
}
}
for i := range config.Pages {
page := &config.Pages[i]
if page.Title == "" {
return fmt.Errorf("page %d has no name", i+1)
}
if page.Width != "" && (page.Width != "wide" && page.Width != "slim" && page.Width != "default") {
return fmt.Errorf("page %d: width can only be either wide or slim", i+1)
}
if page.DesktopNavigationWidth != "" {
if page.DesktopNavigationWidth != "wide" && page.DesktopNavigationWidth != "slim" && page.DesktopNavigationWidth != "default" {
return fmt.Errorf("page %d: desktop-navigation-width can only be either wide or slim", i+1)
}
}
if len(page.Columns) == 0 {
return fmt.Errorf("page %d has no columns", i+1)
}
if page.Width == "slim" {
if len(page.Columns) > 2 {
return fmt.Errorf("page %d is slim and cannot have more than 2 columns", i+1)
}
} else {
if len(page.Columns) > 3 {View on GitHub (pinned to 91324e8de7)
Solutions
- Set width to wide, slim, or default — or delete the line entirely for default behavior
- Check spelling and case — values are lowercase
- Confirm against the page-width documentation for the version in use
Example fix
# before - name: Home width: narrow # after - name: Home width: slim
Defensive patterns
Strategy: type-guard
Validate before calling
var pageWidths = map[string]bool{"wide": true, "slim": true, "default": true, "": true}
for i, p := range cfg.Pages {
if !pageWidths[p.Width] {
return fmt.Errorf("page %d bad width %q", i+1, p.Width)
}
} Type guard
func isValidPageWidth(w string) bool {
switch w {
case "wide", "slim", "default", "":
return true
}
return false
} Prevention
- Offer only wide/slim/default in config generators
- Add a schema (e.g. JSON Schema for YAML) to the editor for autocomplete
When it happens
Trigger: Setting pages[N].width to a string other than wide/slim/default, e.g. 'narrow', 'WIDE', or 'thin'. Empty string is allowed (treated as default).
Common situations: Guessing an undocumented width value; case mismatch ('Wide'); stale configs from versions or forks with different accepted values; copy-paste from a different dashboard tool.
Related errors
- no pages configured
- the password for %s must be at least 6 characters
- page %d has no name
- page %d: desktop-navigation-width can only be either wide or
- page %d has no columns
AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15).
Data as JSON: /api/errors/c59077c77f4edf0b.
Report an issue: GitHub.