deepseek-ai/deepseek-harness · error
client-modules: module graph cycle ${[...open.slice(cycleSta
Error message
client-modules: module graph cycle ${[...open.slice(cycleStart), entry.id].join(' -> ')} — a requested package row must precede its consumers, and factory-form CJS cannot deliver partial exports What it means
Error "client-modules: module graph cycle ${[...open.slice(cycleStart), entry.id].join(' -> ')} — a requested package row must precede its consumers, and factory-form CJS cannot deliver partial exports" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/client/modules/src/index.ts:198
* consumers. An `external` specifier is either the package row it names
* (`<pkg>/client` aliases the bare package) or a static-table name that adds no
* graph edge.
* @param entries - composed rows in scan order.
* @returns the same rows reordered; scan order breaks every tie.
* @throws {Error} when a row requests itself or when the module graph has a
* cycle; the message lists the packages on it.
*/
export function orderByModuleGraph(entries: readonly WebBootEntry[]): WebBootEntry[] {
const rowsById = new Map<string, WebBootEntry>()
for (const entry of entries) rowsById.set(entry.id, entry)
const ordered: WebBootEntry[] = []
const placed = new Set<string>()
const open: string[] = []
const visit = (entry: WebBootEntry): void => {
if (placed.has(entry.id)) return
const cycleStart = open.indexOf(entry.id)
if (cycleStart !== -1) {
throw new Error(
`client-modules: module graph cycle ${[...open.slice(cycleStart), entry.id].join(' -> ')} `
+ '— a requested package row must precede its consumers, and factory-form CJS cannot deliver partial exports',
)
}
open.push(entry.id)
for (const name of entry.external ?? []) {
const dependency = rowsById.get(name) ?? rowsById.get(stripClientSuffix(name))
if (dependency === entry) {
throw new Error(
`client-modules: "${entry.id}" requests module "${name}" that it answers itself `
+ '— a row must not declare its own package in dsh.client.external',
)
}
if (dependency !== undefined) visit(dependency)
}
open.pop()
placed.add(entry.id)
ordered.push(entry)View on GitHub (pinned to b150a551b8)
Solutions
- Order requested package rows before their consumers and break the graph cycle.
When it happens
Trigger: Thrown at packages/client/modules/src/index.ts:198 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/67688ac624d57316.
Report an issue: GitHub.