Troubleshooting
This page explains common errors and the shortest path to fixing them.
Config File Not Found
Veta looks for:
veta.yaml
veta.yml
.veta.yaml
.veta.yml
It searches from the current directory upward.
Fixes:
veta init
veta build --config ./veta.yaml
veta dev --config ./veta.yaml
Invalid Page Object
Every page must be an object with a string permalink.
Valid:
{
permalink: "/about/",
template: "base",
content: "About"
}
If you see an error about layout, rename it to template.
Template Not Found
Page templates are relative to templates/:
template: "base";
Do not write:
template: "templates/base.html";
If extensionless lookup is ambiguous, include the extension:
template: "base.j2";
Duplicate Output Path
Two pages cannot generate the same output file.
These conflict:
{
permalink: "/about/";
}
{
permalink: "/about/index.html";
}
Change one permalink.
Tailwind Input Missing
If tailwindcss.stylesheets includes styles.css, Veta expects:
public/styles.css
Create the file or remove it from tailwindcss.stylesheets to disable that Tailwind CSS entrypoint.
Public Asset Collision
Generated files and public files share the same output namespace.
These conflict:
page permalink: /robots.txt
public/robots.txt
Move one of them.
JavaScript Promise Error
Veta JavaScript is synchronous. Do not use async default exports or return promises.
Use synchronous httpClient calls instead:
export default function({ httpClient, parse }) {
const response = httpClient.get("https://example.com/data.json");
return parse.json(response.body);
}
Frontmatter Error
Frontmatter must start on the first line and close with the same delimiter:
---
title: Hello
---
# Hello
Use --- for YAML and +++ for TOML.