deepseek-ai/deepseek-harness · error
client-modules: ${pkgName} exports["./client"] must be a str
Error message
client-modules: ${pkgName} exports["./client"] must be a string or an object with a string default What it means
Error "client-modules: ${pkgName} exports["./client"] must be a string or an object with a string default" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/client/modules/src/index.ts:158
return {
platform: decl.platform,
...(inject !== undefined ? { inject } : {}),
...(external !== undefined ? { external } : {}),
...(decl.immediately !== undefined ? { immediately: decl.immediately } : {}),
}
}
/** Resolve `exports["./client"]` to a relative path, accepting the string and one-level conditional forms. */
function clientExportOf(pkgName: string, exportsField: unknown): string | undefined {
if (typeof exportsField !== 'object' || exportsField === null) return undefined
const client = (exportsField as Record<string, unknown>)['./client']
if (client === undefined) return undefined
if (typeof client === 'string') return client
if (typeof client === 'object' && client !== null) {
const fallback = (client as Record<string, unknown>).default
if (typeof fallback === 'string') return fallback
}
throw new Error(`client-modules: ${pkgName} exports["./client"] must be a string or an object with a string default`)
}
/** sha1 content hash shortened to 12 hex chars (bundle rev / graph rev). */
function shortHash(input: string | Buffer): string {
return createHash('sha1').update(input).digest('hex').slice(0, 12)
}
/** Graph row for one bundle rev (url carries the rev as its cache-busting query). */
function graphRow(id: string, rev: string, fields: WebBootRowFields): WebBootEntry {
return {
id,
url: `/plugins/${id}/client.js?rev=${rev}`,
rev,
...(fields.inject !== undefined ? { inject: fields.inject } : {}),
...(fields.immediately ? { immediately: true } : {}),
...(fields.external.length > 0 ? { external: fields.external } : {}),
}
}View on GitHub (pinned to b150a551b8)
Solutions
- Set exports[./client] to a string or an object with a string default.
When it happens
Trigger: Thrown at packages/client/modules/src/index.ts:158 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/3696d72c4867e20b.
Report an issue: GitHub.