Fission-AI/OpenSpec · error · TemplateLoadError

Template not found: ${templatePathOnDisk}

Error message

Template not found: ${templatePathOnDisk}

What it means

Error "Template not found: ${templatePathOnDisk}" thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/artifact-graph/instruction-loader.ts:233

      `Schema '${schemaName}' not found`,
      templatePath
    );
  }

  const templatesDir = path.join(schemaDir, 'templates');
  const templatePathOnDisk = path.join(templatesDir, templatePath);

  try {
    FileSystemUtils.assertPathWithin(templatesDir, templatePathOnDisk);
  } catch (error) {
    throw new TemplateLoadError(
      error instanceof Error ? error.message : String(error),
      templatePathOnDisk
    );
  }

  if (!fs.existsSync(templatePathOnDisk)) {
    throw new TemplateLoadError(
      `Template not found: ${templatePathOnDisk}`,
      templatePathOnDisk
    );
  }

  const fullPath = FileSystemUtils.canonicalizeExistingPath(templatePathOnDisk);

  try {
    return fs.readFileSync(fullPath, 'utf-8');
  } catch (err) {
    const ioError = err instanceof Error ? err : new Error(String(err));
    throw new TemplateLoadError(
      `Failed to read template: ${ioError.message}`,
      fullPath
    );
  }
}

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/artifact-graph/instruction-loader.ts:233 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/c54e27ffebafc761. Report an issue: GitHub.