{"record":{"id":"bb331937ea8dfce5","repo":"santifer/career-ops","slug":"template-filefor-chosen-missing-required-place","errorCode":null,"errorMessage":"Template ${fileFor(chosen)} missing required placeholders: ${v.missing.map((m) => `{{${m}}}`).join(', ')}","messagePattern":"Template (.+?) missing required placeholders: (.+?)\\}\\}`\\)\\.join\\(', '\\)\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cv-templates.mjs","lineNumber":154,"sourceCode":"\n  const explicit = Boolean(name && String(name).trim());\n  let chosen = kebab(explicit ? name : loadProfileDefault(kind, { profilePath }) || 'standard');\n  const fileFor = (n) => (n === 'standard' ? `${cfg.prefix}.${format}` : `${cfg.prefix}.${n}.${format}`);\n\n  let path = resolve(dir, fileFor(chosen));\n  if (!existsSync(path)) {\n    if (fallback && chosen !== 'standard') {\n      chosen = 'standard';\n      path = resolve(dir, fileFor(chosen));\n    }\n    if (!existsSync(path)) {\n      throw new Error(`Template not found for kind=${kind} name=${chosen} (${fileFor(chosen)})`);\n    }\n  }\n  if (format === 'html') {\n    const v = validateTemplate(path, kind);\n    if (!v.ok) {\n      throw new Error(\n        `Template ${fileFor(chosen)} missing required placeholders: ${v.missing.map((m) => `{{${m}}}`).join(', ')}`\n      );\n    }\n  }\n  return path;\n}\n\n// ---- CLI ----\nconst isMain = process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url);\nif (isMain) {\n  const argv = process.argv.slice(2);\n  const cmd = argv[0];\n  const kind = argv[1];\n  const flags = Object.fromEntries(\n    argv.filter((a) => a.startsWith('--')).map((a) => {\n      const [k, v] = a.replace(/^--/, '').split('=');\n      return [k, v ?? true];\n    })","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/cv-templates.mjs#L136-L172","documentation":"Error \"Template ${fileFor(chosen)} missing required placeholders: ${v.missing.map((m) => `{{${m}}}`).join(', ')}\" thrown in santifer/career-ops.","triggerScenarios":"Thrown at cv-templates.mjs:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the missing {{placeholders}} to the template so the CV renderer can inject values.","Or remove the fields that depend on them from the render path."],"exampleFix":"# add {{summary}} and {{experience}} back into templates/cv-template.html","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}