Skip to content
qino

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.

MessageCauseFix
Configure "<key>" inside views.default or a custom view, not at the root.resolveRelations, augment, filter, or sort on the paramsMove 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 functionWrap it in a factory
The views factory must synchronously return an object of named views.Factory returned a Promise or a non-objectReturn the object directly
The views factory must return a "default" view created with view({ ... }).No own default keyAdd default: view({})
View "<name>" must be created with view({ ... }).A plain object was used as a viewWrap it with the helper
view() requires a configuration object.view() called with nothing, null, or an arrayPass an object, view({}) at minimum
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 helperRemove 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 assembledRemove them
extractExtension: file "<file>" must end with one of .md, .mdx, .markdown, .json.Item file has an unsupported extensionUse a supported extension

Getter options

MessageCauseFix
Unknown view "<name>". Available views: <names>.view not declared. (none) when no views existDeclare it or pick a listed name
Getter resolveRelations is no longer supported. Configure it in a view and select that view instead.resolveRelations passed to a getterConfigure it in a view
Getter filter and sort are not supported. Configure them in a collection view instead.filter or sort passed to a getterConfigure them in a view
Entry "<slug>" in collection "<directory>" is excluded by view "<view>".getEntry on an entry the view's filter rejectsSelect a view without a filter

Parsing and validation

MessageCauseFix
YAML frontmatter must contain a single document.Several --- documents at the top of a fileKeep one frontmatter block
YAML frontmatter must be a mapping of field names to values.Frontmatter is a scalar or a listUse key: value pairs
Validation failed for <filePath>: followed by <path>: <message> linesSchema rejected the entryFix the content or the schema
Schema for <filePath> returned a Promise. Qino requires synchronous Standard Schema validators.Async validatorUse a synchronous schema
<filePath>: fields reserved for Qino cannot appear in content or schema output: _meta._meta in content, or introduced by a transformRename the field
<filePath>: fields reserved for Qino cannot appear in content or schema output: _meta, markdown, raw._meta, markdown or raw declared in Markdown frontmatterRemove it; Qino supplies markdown and raw

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

MessageCauseFix
Tree: folder "<path>" is missing its sibling file "<path><ext>".Non-empty folder without an anchor fileAdd <name><ext> next to the folder
Tree entry "<slug>" not found in tree "<directory>".getTree(slug), getNextNode, getPreviousNode with an unknown slugCheck the slug
<filePath>: expected titleField "<field>" to resolve to a string, got <type>.The title field is missing or not a stringSet it in frontmatter
<orderPath> is not valid JSON.Malformed _order.jsonFix 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 extensionList filenames with the extension
<orderPath>: entry "<file>" does not exist on disk (no matching "<file>" file or non-empty "<name>/" folder).Listed file is missingRemove the entry or add the file

Relations

MessageCauseFix
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 instanceDefine everything from one instance
Expected string at relation "<key>" in <filePath>; got <type>.Relation field is not a stringStore a content path string
Empty relation reference at "<key>" in <filePath>.Empty stringStore a content path
Relation "<key>" in <filePath>: expected value "<file>" (target item "<file>"), got "<value>".Item reference does not equal the item's fileUse the exact file path
Relation "<key>" in <filePath>: expected value under "<dir>/" (target <kind> "<dir>"), got "<value>".Bare slug or wrong directoryPrefix with the target directory
Relation "<key>" in <filePath>: expected value ending with "<ext>" (target <kind> "<dir>"), got "<value>".Missing or wrong extensionAdd the target's extension
Failed to resolve relation "<key>" → <dir>/<slug> (from <filePath>): <message>Target file missing or invalidFix the target entry
Expected array at "[*]" segment; got <type>.[*] in the path but the value is not an arrayFix the content or the path
Relation path cannot be empty. / Invalid relation path "<path>": empty segment. / Invalid relation path "<path>": bare "[*]" segment.Malformed relation keyUse field, field[*], or a.b[*].c

Augment

MessageCauseFix
<filePath>: augment failed: <message>The callback threwFix the callback
<filePath>: augment must return an object.Returned a non-objectReturn an object
<filePath>: augment cannot add reserved or overwrite existing fields: <keys>.Output overlaps entry fields, markdown or rawRename the derived fields

CLI

MessageCauseFix
Unknown command: <command>Not lint, check, or buildUse one of the three
"qino" folder not found at "<path>"No qino/ in the working directoryRun 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 exportDefault-export the instance
"<path>" is not a directorycontentFolder or mediaFolder missingCreate the folder or fix the path
No primitives found under "qino/". Define at least one collection, item, or tree.No exported definitionsExport at least one
Collection directories overlap: "<a>" and "<b>". Each collection must own a distinct, non-overlapping directory.Two collections share or nest pathsGive each its own directory
Tree directories overlap: "<a>" and "<b>". Each tree must own a distinct, non-overlapping directory.Two trees share or nest pathsGive each its own directory
Two items target the same file: "<file>". Each item must own a distinct file.Duplicate item fileRemove one
Tree directory "<dir>" overlaps with collection directory "<dir>". Trees and collections must own distinct directories.A tree and a collection share or nest pathsSeparate them
Item file "<file>" sits inside tree directory "<dir>". A tree owns its directory exclusively.Item inside a treeMove the item
Item file "<file>" sits inside collection directory "<dir>". A collection owns its directory exclusively.Item inside a collectionMove 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 callsUse 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 instanceUse one instance
Collection "<dir>" failed validation: <message> / Tree "<dir>" failed validation: <message> / Item "<file>" failed validation: <message>qino check found an invalid fileFix the file named in the inner message

qino check also warns, without failing, with Collection "<dir>" is empty. and Tree "<dir>" is empty.