Skip to content
Latchkey

Vale ".vale.ini StylesPath not found" in CI

Vale reads StylesPath from .vale.ini to locate its rule packages. If that directory is missing on the runner (styles never synced, or gitignored), Vale errors before checking any prose.

What this error means

Vale exits with an error such as "runtime error: could not find styles" or reports zero rules applied because the StylesPath directory does not exist in the CI checkout.

Vale
Error: could not find "StylesPath" (styles) relative to the config file
.vale.ini: StylesPath = styles

Common causes

Styles are gitignored and never synced in CI

Teams often gitignore the synced styles/ folder. CI then has no styles because vale sync was not run.

StylesPath is relative to the wrong directory

The path in .vale.ini is resolved relative to the config file; running Vale from another directory or a shallow checkout can miss it.

How to fix it

Run vale sync before vale

  1. Add a vale sync step to download the packages listed in .vale.ini.
  2. Then run vale against your docs.
  3. Cache the styles folder to speed subsequent runs.
.github/workflows/docs.yml
- run: vale sync
- run: vale docs/

Set StylesPath and Packages explicitly

Declare both so Vale knows where styles live and what to sync.

.vale.ini
StylesPath = styles
Packages = Google, write-good

[*.md]
BasedOnStyles = Vale, Google

How to prevent it

  • Always run vale sync in CI when styles/ is gitignored.
  • Keep StylesPath relative to .vale.ini and run Vale from that root.
  • Cache the synced styles directory keyed on .vale.ini.

Frequently asked questions

What causes ""StylesPath" not found"?
Teams often gitignore the synced styles/ folder. CI then has no styles because vale sync was not run.
How do I fix "StylesPath" not found?
Run vale sync before vale

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card