Skip to content

bug: Page map validation fails on Windows due to path separator mismatch #914

@Janhvibabani

Description

@Janhvibabani

Describe the bug

The docs site fails to build on Windows with the following error:

Error: Validation of "_meta" file has failed.
The field key "User Guide" in _meta file refers to a page that cannot be found, remove this key from "_meta" file.

Output from KubeStellar-Snapshot.sh

Root Cause

The getAllDocFiles() function in src/app/docs/page-map.ts uses path.relative() to generate file paths. On Windows, this returns backslashes (direct\get-started.md), while the navigation structure uses forward slashes (direct/get-started.md).

When checking allDocFiles.includes(value), the comparison fails because:

  • direct\get-started.md (Windows path) ≠ direct/get-started.md (nav structure)

This causes pages to not be found, and the _meta validation fails.

Image

Steps To Reproduce

  1. Clone the repo on a Windows machine
  2. Run npm install
  3. Run npm run dev or npm run build
  4. Observe the _meta validation error

Expected Behavior

It should run without any build error.

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions