deepseek-ai/deepseek-harness · error · Error

typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] m

Error message

typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] must be a string or an object with a string default

What it means

Error "typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] must be a string or an object with a string default" thrown in deepseek-ai/deepseek-harness.

Source

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

export const Config: z<Config> = z.object({
  packages: z.array(z.string().min(1)).default([]),
})

type ResolvedConfig = Required<Config>

const MEMBER_KINDS = new Set(['property', 'method', 'getter', 'setter', 'call', 'construct', 'index'])

/** Resolve the `./typert` export to a relative path, accepting the string and one-level conditional forms. */
function typertExportOf(pkgName: string, exportsField: unknown): string | undefined {
  if (typeof exportsField !== 'object' || exportsField === null) return undefined
  const target = (exportsField as Record<string, unknown>)[TYPERT_HOST_EXPORT]
  if (target === undefined) return undefined
  if (typeof target === 'string') return target
  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(

View on GitHub (pinned to b150a551b8)

Solutions

  1. Fix the package exports entry for the typert host export to be a string or an object with a string default.

When it happens

Trigger: Thrown at packages/typert/loader/src/index.ts:71 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/aad72fe3e12fa523. Report an issue: GitHub.