Since 0.1.0
Errors
Every error message qino can throw, what causes it, and how to fix it.
Messages are listed verbatim with placeholders in angle brackets. The CLI prints them as Error: <message> and exits with code 1.
Definition time
Thrown when a define* call runs, usually at import.
| Message | Cause | Fix |
|---|---|---|
Configure "<key>" inside views.default or a custom view, not at the root. | resolveDepth, augment, filter, or sort on the params | Move it into views: (view) => ({ default: view({ ... }) }) |
Configure views with views: (view) => ({ default: view({ ... }) }). Object-form views are no longer supported. | views is an object, not a function | Wrap it in a factory |
The views factory must synchronously return an object of named views. | Factory returned a Promise or a non-object | Return the object directly |
The views factory must return a "default" view created with view({ ... }). | No own default key | Add default: view({}) |
View "<name>" must be created with view({ ... }). | A plain object was used as a view | Wrap it with the helper |
view() requires a configuration object. | view() called with nothing, null, or an array | Pass an object, view({}) at minimum |
view() no longer takes resolveRelations. Set depths by relation with resolveDepth, such as { author: 2 }. | A view sets resolveRelations | Replace it with resolveDepth |
View "<name>": resolveDepth sets "<path>", which isn't a relation. Relations: <paths>. | A resolveDepth key isn't in relations | Use a declared relation path |
View "<name>": resolveDepth of "<path>" must be a whole number from 0 to 6, got <value>. | A depth outside 0 to 6, or not a number | Use a whole number from 0 to 6 |
View "<name>": resolveDepth must be an object of depths by relation path, such as { author: 2 }. | resolveDepth is a boolean, number, or array | Pass an object keyed by relation path |
tree views do not support filter or sort. / item views do not support filter or sort. | filter or sort passed to a tree or item helper | Remove them; only collections filter and sort |
tree view "<name>" does not support filter or sort. / item view "<name>" does not support filter or sort. | Same, caught when views are assembled | Remove them |
extractExtension: file "<file>" must end with one of .md, .mdx, .markdown, .json. | Item file has an unsupported extension | Use a supported extension |
media "<path>" of "<id>" isn't a valid path: <message> | Empty or malformed path, such as "seo..image" | Use the relation path syntax: "image", "gallery[*]", "seo.image" |
media "<path>" of "<id>" is also a relation. A field holds either a media URL or a reference. | The same path is in relations | Remove it from one of them |
media "markdown" of "<id>" is the Markdown body: set its rules in markdown.media. | Body rules under media, as before 0.20 | Move them to markdown.media |
markdown of "<id>" configures the Markdown body, but JSON files have none. | markdown on a JSON primitive | Remove it |
markdown of "<id>" must be an object, got <type>. | markdown isn't an object, from JavaScript | Pass { stats?, toc?, media? } |
markdown.toc.upTo of "<id>" must be one of h1, h2, h3, h4, h5, h6, got <value>. | upTo isn't a heading tag | Use "h1" to "h6" |
markdown.toc.slug of "<id>" must be a function, got <type>. | slug isn't a function | Pass a function, (text) => id |
<markdown.media.parse | markdown.media, rule <n>, parse> of "<id>" must be a function, got <type>. | A body rule's parse isn't a function | Pass a function, (value, ctx) => url |
Pages
Thrown when initQino or a define* call runs, for siteUrl, pages and page. <owner> is Collection "<directory>", Tree "<directory>" or Item "<file>", and <option> is pages.index, pages.entry or page.
| Message | Cause | Fix |
|---|---|---|
siteUrl "<siteUrl>" must be an http(s) origin, such as "https://example.com". | Not a URL, another protocol, credentials, or a path, query or hash after the host | Pass the origin alone |
<owner> declares pages, so initQino needs a siteUrl, such as "https://example.com". / <owner> declares a page, so initQino needs a siteUrl, such as "https://example.com". | pages or page without siteUrl | Set siteUrl on initQino |
<owner>: <option> "<path>" must start with "/". | A relative path | Start it with / |
<owner>: <option> "<path>" must stay on the site. | A path that resolves to another host, such as //example.com | Use a path on your site |
<owner>: <option> "<path>" must be a path, without "?" or "#". | A query or a fragment | Remove it |
<owner>: <option> "<path>" must not contain "\", tabs or line breaks. | URLs read \ as / and drop tabs and line breaks | Remove them |
<owner>: <option> "<path>" must not contain "." or ".." segments. | A . or .. segment, %2e included | Remove it |
<owner>: <option> "<path>" takes no token. | A {token} in pages.index or page | Remove it |
<owner>: pages.entry "<path>" must contain {slug} once. | No {slug}, or several | Use {slug} once |
<owner>: pages.entry "<path>" takes no token but {slug}. | Another token, such as {id} | Remove it |
<owner>: pages.title must name the index page, such as "Blog". | title missing or blank | Set the index page's title |
Getter options
| Message | Cause | Fix |
|---|---|---|
Unknown view "<name>". Available views: <names>. | view not declared. (none) when no views exist | Declare it or pick a listed name |
Getter resolveDepth is not supported. Configure resolveDepth in a view and select that view instead. | resolveDepth passed to a getter | Configure it in a view |
Getter filter and sort are not supported. Configure them in a collection view instead. | filter or sort passed to a getter | Configure them in a view |
Entry "<slug>" in collection "<directory>" is excluded by view "<view>". | getEntry on an entry the view's filter rejects | Select a view without a filter |
Collection "<directory>" (view "<view>"): page <n> is out of range, expected 1 to <pageCount>. | getPaginatedEntries past the last page | Link only to pages up to pageCount |
Collection "<directory>" (view "<view>"): <page | perPage> must be a positive integer, got <value>. | A page or page size of 0, a fraction, or a string | Convert route params with Number() |
<Collection | Tree> "<directory>" has no pages: declare them to get page Markdown and Markdown URLs. / Item "<file>" has no page: declare it to get page Markdown and a Markdown URL. | getPageMarkdown or getMarkdownUrl without pages or page | Declare them on the primitive |
Parsing and validation
| Message | Cause | Fix |
|---|---|---|
YAML frontmatter must contain a single document. | Several --- documents at the top of a file | Keep one frontmatter block |
YAML frontmatter must be a mapping of field names to values. | Frontmatter is a scalar or a list | Use key: value pairs |
Validation failed for <filePath>: followed by <path>: <message> lines | Schema rejected the entry | Fix the content or the schema |
Fields added by qino after validation cannot be declared in the schema: <fields>. (after the issue lines) | A Markdown schema requires markdown, _stats, or _toc | Remove them from the schema |
Schema for <filePath> returned a Promise. qino requires synchronous Standard Schema validators. | Async validator | Use a synchronous schema |
<filePath>: fields reserved for qino cannot appear in content or schema output: _meta. | _meta in content, or introduced by a transform | Rename the field |
<filePath>: fields reserved for qino cannot appear in content or schema output: _meta, markdown, _stats, _toc. | _meta, markdown, _stats or _toc in Markdown frontmatter or schema output | Remove it; qino supplies markdown, _stats, and _toc |
<filePath>: media "<path>" must be a URL in mediaFolder, starting with "/". Got <value>. | An image field holds an external or relative URL | Store the file in mediaFolder and use its URL, such as /images/a.webp |
<filePath>: media "<path>": "<url>" doesn't exist in "<mediaFolder>". | An image field points to a missing file | Add the file or fix the URL |
<filePath>: media "<path>": "<url>" is <type>, but only <accepted> is accepted. | An image field points to a file of another type | Use a file of the accepted type, or change accepted |
<filePath>: media "<path>": "<url>" is <size>, over the <maxSize> limit. | An image field points to a file over maxSize | Use a smaller file, or raise maxSize |
<filePath>: media "<path>": "<file>" isn't an image. | An image field points to a file of another type | Point it to an image |
A .json file that is not valid JSON throws the raw SyntaxError from JSON.parse. A missing file throws the raw Node ENOENT error.
Trees
| Message | Cause | Fix |
|---|---|---|
Tree: folder "<path>" is missing its sibling file "<path><ext>". | Non-empty folder without an anchor file | Add <name><ext> next to the folder |
Tree entry "<slug>" not found in tree "<directory>". | getTree(slug), getAncestorNodes, getNextNode, getPreviousNode with an unknown slug | Check the slug |
<filePath>: expected titleField "<field>" to resolve to a string, got <type>. | The title field is missing or not a string | Set it in frontmatter |
<orderPath> is not valid JSON. | Malformed _order.json | Fix the JSON |
<orderPath>: expected an array of filenames ending in "<ext>". followed by Each filename must end with "<ext>". | Not an array, or an entry without the extension | List filenames with the extension |
<orderPath>: entry "<file>" does not exist on disk (no matching "<file>" file or non-empty "<name>/" folder). | Listed file is missing | Remove the entry or add the file |
Relations
| Message | Cause | Fix |
|---|---|---|
Relation "<key>" (from <filePath>) points to a primitive created by a different initQino() call. All related primitives must come from the same qino instance. | Target from another instance | Define everything from one instance |
Expected string at relation "<key>" in <filePath>; got <type>. | Relation field is not a string | Store a content path string |
Empty relation reference at "<key>" in <filePath>. | Empty string | Store a content path |
Relation "<key>" in <filePath>: expected value "<file>" (target item "<file>"), got "<value>". | Item reference does not equal the item's file | Use the exact file path |
Relation "<key>" in <filePath>: expected value under "<dir>/" (target <kind> "<dir>"), got "<value>". | Bare slug or wrong directory | Prefix with the target directory |
Relation "<key>" in <filePath>: expected value ending with "<ext>" (target <kind> "<dir>"), got "<value>". | Missing or wrong extension | Add the target's extension |
Failed to resolve relation "<key>" → <dir>/<slug> (from <filePath>): <message> | Target file missing or invalid | Fix the target entry |
Expected array at "[*]" segment; got <type>. | [*] in the path but the value is not an array | Fix the content or the path |
Relation path cannot be empty. / Invalid relation path "<path>": empty segment. / Invalid relation path "<path>": bare "[*]" segment. | Malformed relation key | Use field, field[*], or a.b[*].c |
Augment
| Message | Cause | Fix |
|---|---|---|
<filePath>: augment failed: <message> | The callback threw | Fix the callback |
<filePath>: augment must return an object. | Returned a non-object | Return an object |
<filePath>: augment cannot add reserved or overwrite existing fields: <keys>. | Output overlaps entry fields, markdown, _stats, or _toc | Rename the derived fields |
CLI
| Message | Cause | Fix |
|---|---|---|
Unknown command: <command> | Not lint, check, or build | Use one of the three |
"qino" folder not found at "<path>" | No qino/ in the working directory | Run from the project root |
No initQino() instance found as the default export of "qino/index.ts". Export it with `export default initQino(...)`. | Wrong or missing default export | Default-export the instance |
"<path>" is not a directory | contentFolder or mediaFolder missing | Create the folder or fix the path |
No primitives found under "qino/". Define at least one collection, item, or tree. | No exported definitions | Export at least one |
Collection directories overlap: "<a>" and "<b>". Each collection must own a distinct, non-overlapping directory. | Two collections share or nest paths | Give each its own directory |
Tree directories overlap: "<a>" and "<b>". Each tree must own a distinct, non-overlapping directory. | Two trees share or nest paths | Give each its own directory |
Two items target the same file: "<file>". Each item must own a distinct file. | Duplicate item file | Remove one |
Tree directory "<dir>" overlaps with collection directory "<dir>". Trees and collections must own distinct directories. | A tree and a collection share or nest paths | Separate them |
Item file "<file>" sits inside tree directory "<dir>". A tree owns its directory exclusively. | Item inside a tree | Move the item |
Item file "<file>" sits inside collection directory "<dir>". A collection owns its directory exclusively. | Item inside a collection | Move the item |
Primitive "<kind>" was created by a different qino instance. Expected "<a>" but got "<b>". Make sure all primitives are created with the same qino config. | Several initQino calls | Use one instance |
Relation "<field>" points to a primitive created by a different initQino() call. All related primitives must come from the same qino instance. | Relation target from another instance | Use one instance |
Collection "<dir>" failed validation: <message> / Tree "<dir>" failed validation: <message> / Item "<file>" failed validation: <message> | qino check found an invalid file | Fix the file named in the inner message |
Schema of "<id>" can't be converted to JSON Schema: its validator doesn't implement Standard JSON Schema (https://standardschema.dev/json-schema). | cloud set, unsupported validator | Use a validator that implements it |
Schema of "<id>" can't be converted to JSON Schema: <message> | A field has no JSON Schema equivalent | Use a JSON-representable type |
"qino/_generated/config.json" not found. Run `qino build` and commit it. | cloud set, file never built or not committed | Run qino build and commit the file |
"qino/_generated/config.json" is out of date. Run `qino build` and commit it. | A schema, primitive, or config changed without rebuilding. Thrown by check, and build in CI | Run qino build and commit the file |
Relation "<path>" of "<id>" isn't a field of its schema input. <hint> | cloud set, a transform renames the relation field | Use the on-disk field name, or move the transform out of the schema |
titleField "<field>" of "<id>" isn't a field of its schema input. <hint> | cloud set, a transform renames the title field | Use the on-disk field name, or move the transform out of the schema |
<Relation "<path>" | titleField "<field>"> of "<id>" has a different value on disk than after validation in "<file>". ... | cloud set, a transform maps another field onto it or changes its value | Keep relation fields and titleField unchanged by transforms |
Relation "<path>" of "<id>" targets <kind> "<target>", which isn't exported from a file under "qino/". Export it so it can be described in config.json. | cloud set, relation target not exported | Export the target from a file under qino/ |
config.json requires `cloud` in initQino. | Internal: config.json built without cloud | Set cloud on initQino |
"<id>" sets `cloud`, but initQino doesn't. Add `cloud` to initQino. | A primitive sets cloud, initQino doesn't | Add cloud to initQino |
<searchableBy | sortableBy | hiddenFields | media> "<field>" of "<id>" isn't a field of its schema input. Use the on-disk field name. | A transform renames the field, or it doesn't exist | Use the on-disk field name |
sortableBy "<field>" of "<id>" isn't a string, number, or boolean on disk. | Sorting by an array or object | Sort by a scalar field |
hiddenFields "<field>" of "<id>" is required without a default, so editors couldn't create entries. Make it optional or give it a default. | Hiding a required field | Make it optional or give it a default |
media "<path>" of "<id>" isn't a string on disk. | The path points to a number, array, or object | Point to a string field; use [*] for arrays of strings |
media "<path>" of "<id>" accepts <value>, which isn't a known MIME type. Use an exact type, e.g. "image/webp". | A wildcard like "image/*", a typo, or an array on a field, from JavaScript | Use one exact MIME type per field |
markdown.media of "<id>", rule <n>, accepts <value>, which isn't a known MIME type. Use an exact type, e.g. "image/webp". | A wildcard or a typo in a markdown.media rule | Use exact MIME types |
media "<path>" of "<id>" has maxSize <value>. Use 50–950KB in steps of 50, or 1–100MB. | Size out of range or malformed, e.g. JavaScript passing 5000 | Use a size such as "5MB" |
<n> media files break their media rules: followed by - <file> (<field | line <n>>) → <url> <reason> lines | qino check found media files of another type, over maxSize, missing, or outside mediaFolder | Replace the files, or change the rules. See Media |
saveEntryAs "<saveEntryAs>" of "<id>" needs at least one {field}. | No token | Add a {field}, such as "{title}" |
saveEntryAs "<saveEntryAs>" of "<id>" can't contain "/" or ".": the cloud UI adds the extension and, in trees, the parent folder. | A folder or an extension in the pattern | Remove it |
saveEntryAs "<saveEntryAs>" of "<id>" has an unknown field "{<field>}". Use a top-level field of its schema input. | Typo, nested or renamed field | Use a top-level, on-disk field name |
saveEntryAs "<saveEntryAs>" of "<id>" uses "{<field>}", which isn't a string, number, or boolean on disk. | An array or object field | Use a scalar field |
saveEntryAs "<saveEntryAs>" of "<id>" uses "{<field>}", which is optional, so entries could get an empty name. Use a required field. | An optional field, a field with a default, or one optional in a union variant | Use a field every entry has |
saveEntryAs of "<id>" names new entries, but an item is a single file. | saveEntryAs on an item, from JavaScript | Remove it |
displayEntryAs "<displayEntryAs>" of "<id>" needs at least one {field}. | No token | Add a {field}, such as "{title}" |
displayEntryAs "<displayEntryAs>" of "<id>" has an unknown field "{<field>}". Use a top-level field of its schema input. | Typo, nested or renamed field | Use a top-level, on-disk field name |
displayEntryAs "<displayEntryAs>" of "<id>" uses "{<field>}", which isn't a string, number, or boolean on disk. | An array or object field | Use a scalar field |
displayEntryAs "<displayEntryAs>" of "<id>" uses "{<field>}", which is optional, so entries could get an empty label. Use a required field. | An optional field, a field with a default, or one optional in a union variant | Use a field every entry has |
displayEntryAs of "<id>" labels entries, but an item is a single file. Name it with displayAs. | displayEntryAs on an item, from JavaScript | Use displayAs |
displayAs "<displayAs>" of "<id>" is empty. Name the primitive, or leave it out. | An empty or blank name | Set a name, or remove it to use the id |
displayAs "<displayAs>" of "<id>" names the primitive, so it takes no {field}. Label entries with displayEntryAs. | A {field} in the primitive's name | Move the template to displayEntryAs |
cloud.media.saveFileAs "<saveFileAs>" of "<id>" has an unknown token "{<token>}". Use {id}, {field}, {name}, {hash}. | Unsupported token, such as {slug} | Use a supported token |
cloud.media.saveFileAs "<saveFileAs>" of "<id>" can't contain "." in its file name: the cloud UI adds the extension. | An extension in the path, such as .{ext} | Remove it |
cloud.media.saveFileAs "<saveFileAs>" of "<id>" must end with a file name. | A path ending with / | Add a file name, such as {name}-{hash} |
cloud.media.saveFileAs "<saveFileAs>" of "<id>" must be relative to mediaFolder, without a leading "/" or "..". | The path escapes mediaFolder | Use a relative path |
`cli.build.llmsTxt` needs a siteUrl: set one in initQino, such as "https://example.com". | llmsTxt on without siteUrl | Set siteUrl on initQino |
The llms.txt template "<path>" doesn't exist. Create it with your site's title, summary and "When to use" section, or set `cli.build.llmsTxt.template`. | No file at the template path, <contentFolder>/llms.md by default | Create it, or point template at it |
<Collection | Tree> "<directory>": pages.index is "/", so its section llms.txt would replace llms.txt. Give the index page another path, or turn off `cli.build.llmsTxt.sections`. | sections on, and a collection or tree whose index page is / | Move pages.index, or turn sections off |
<Collection | Tree> "<directory>" and <Collection | Tree> "<directory>" would both write the section llms.txt "<path>". Give one another index page, or turn off `cli.build.llmsTxt.sections`. | sections on, and two collections or trees with the same index page | Give one another pages.index, or turn sections off |
qino check also warns, without failing, with Collection "<dir>" is empty. and Tree "<dir>" is empty. qino build warns with "<mediaFolder>/index.md" hides that page's Markdown. Delete it: qino build no longer writes it. when a page's Markdown URL is /index.md and an index.md it can't tell it wrote is still there.