deepseek-ai/deepseek-harness · error · Error

typert-loader: exports " " but its module has no TYPERT…

Error message

typert-loader: ${pkgName} exports "${TYPERT_HOST_EXPORT}" but its module has no TYPERT manifest object

What it means

The package exports a `./typert` subpath and the loader imported it, but the module has no `TYPERT` export that is an object — the build artifact does not carry the generated typert manifest, so it cannot enter the typed registry.

Solutions

  1. Add the TYPERT manifest object to the module behind the typert host export.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/typert/loader/src/index.ts:85 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/082748b48c288afe. Report an issue: GitHub.

Appendix: source

Thrown at packages/typert/loader/src/index.ts:85

  if (typeof target === 'object' && target !== null) {
    const fallback = (target as Record<string, unknown>).default
    if (typeof fallback === 'string') return fallback
  }
  throw new Error(`typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] must be a string or an object with a string default`)
}

/**
 * Narrow a dynamically imported typert module's `TYPERT` export to a
 * contribution owned by `pkgName`. This is the module/file boundary: the
 * manifest crosses from a build artifact into the typed registry, so every
 * field is checked and every failure names the package and the defect.
 * @param pkgName - the package whose typert face was imported.
 * @param exported - the module's `TYPERT` export.
 * @returns the validated contribution.
 */
export function validateTypertManifest(pkgName: string, exported: unknown): TypertContribution {
  if (typeof exported !== 'object' || exported === null) {
    throw new Error(`typert-loader: ${pkgName} exports "${TYPERT_HOST_EXPORT}" but its module has no TYPERT manifest object`)
  }
  const manifest = exported as Record<string, unknown>
  if (manifest.package !== pkgName) {
    throw new Error(
      `typert-loader: ${pkgName} TYPERT manifest names package ${JSON.stringify(manifest.package)} — the manifest must be owned by the package that exports it`,
    )
  }
  if (manifest.face !== 'host') {
    throw new Error(`typert-loader: ${pkgName} exports "${TYPERT_HOST_EXPORT}" but TYPERT.face is not "host"`)
  }
  if (!Array.isArray(manifest.schemas)) {
    throw new Error(`typert-loader: ${pkgName} TYPERT.schemas must be an array`)
  }
  for (const value of manifest.schemas as unknown[]) {
    if (typeof value !== 'object' || value === null) {
      throw new Error(`typert-loader: ${pkgName} TYPERT.schemas contains a non-object schema`)
    }
    const schema = value as Record<string, unknown>

View on GitHub (pinned to b150a551b8)