{"record":{"id":"aad72fe3e12fa523","repo":"deepseek-ai/deepseek-harness","slug":"typert-loader-pkgname-exports-typert-host-e","errorCode":null,"errorMessage":"typert-loader: ${pkgName} exports[\"${TYPERT_HOST_EXPORT}\"] must be a string or an object with a string default","messagePattern":"typert-loader: (.+?) exports\\[\"(.+?)\"\\] must be a string or an object with a string default","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/typert/loader/src/index.ts","lineNumber":71,"sourceCode":"export const Config: z<Config> = z.object({\n  packages: z.array(z.string().min(1)).default([]),\n})\n\ntype ResolvedConfig = Required<Config>\n\nconst MEMBER_KINDS = new Set(['property', 'method', 'getter', 'setter', 'call', 'construct', 'index'])\n\n/** Resolve the `./typert` export to a relative path, accepting the string and one-level conditional forms. */\nfunction typertExportOf(pkgName: string, exportsField: unknown): string | undefined {\n  if (typeof exportsField !== 'object' || exportsField === null) return undefined\n  const target = (exportsField as Record<string, unknown>)[TYPERT_HOST_EXPORT]\n  if (target === undefined) return undefined\n  if (typeof target === 'string') return target\n  if (typeof target === 'object' && target !== null) {\n    const fallback = (target as Record<string, unknown>).default\n    if (typeof fallback === 'string') return fallback\n  }\n  throw new Error(`typert-loader: ${pkgName} exports[\"${TYPERT_HOST_EXPORT}\"] must be a string or an object with a string default`)\n}\n\n/**\n * Narrow a dynamically imported typert module's `TYPERT` export to a\n * contribution owned by `pkgName`. This is the module/file boundary: the\n * manifest crosses from a build artifact into the typed registry, so every\n * field is checked and every failure names the package and the defect.\n * @param pkgName - the package whose typert face was imported.\n * @param exported - the module's `TYPERT` export.\n * @returns the validated contribution.\n */\nexport function validateTypertManifest(pkgName: string, exported: unknown): TypertContribution {\n  if (typeof exported !== 'object' || exported === null) {\n    throw new Error(`typert-loader: ${pkgName} exports \"${TYPERT_HOST_EXPORT}\" but its module has no TYPERT manifest object`)\n  }\n  const manifest = exported as Record<string, unknown>\n  if (manifest.package !== pkgName) {\n    throw new Error(","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/typert/loader/src/index.ts#L53-L89","documentation":"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.","triggerScenarios":"Thrown at packages/typert/loader/src/index.ts:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the package exports entry for the typert host export to be a string or an object with a string default."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}