Skip to main content

Troubleshooting

Template not found

By default, TemplatesStore.get() (used internally by QTemplate#render()) logs a warning and returns an empty string when a template key is missing, rather than throwing. Set templates.throwOnMissing to true to make this a hard failure (a plain Error, Template not found: <name>) during development/testing so missing templates are caught early instead of silently rendering blank output.

Template renders stale content after a file edit

TemplatesStore.load() reads file contents into memory once. Call TemplatesStore.reload() (optionally with a specific template name) after editing template files on disk, or set templates.disableCache to true to always re-read from disk.

Partial not rendering / {{> module.filename}} produces nothing

Partials are stored separately from templates and must be loaded explicitly with PartialsStore.load(module, ...folders) before rendering a template that references them. Clear and reload partials (PartialsStore.clear() then PartialsStore.load(...)) after editing partial files so Handlebars picks up the new content.

Common Errors

@quik/templates has no locale file and defines no typed QTranslatableError subclasses — the only module-specific failure is the plain Error thrown by TemplatesStore.get() when templates.throwOnMissing is enabled and a template key cannot be resolved.