{"record":{"id":"a6e61eb635a777be","repo":"deepseek-ai/deepseek-harness","slug":"client-modules-require-cycle-through-id-fac","errorCode":null,"errorMessage":"client-modules: require cycle through \"${id}\" (factory-form CJS cannot deliver partial exports)","messagePattern":"client-modules: require cycle through \"(.+?)\" \\(factory-form CJS cannot deliver partial exports\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/modules/src/client/system.ts","lineNumber":154,"sourceCode":"    const next = [...open, row.id]\n    for (const request of row.external) {\n      const id = stripClientSuffix(request)\n      if (this.seed.has(request) || this.loadCache.has(id)) continue\n      const dependency = this.graphRows.get(id)\n      if (dependency !== undefined) await this.arriveGraphRow(dependency, next)\n    }\n    await this.arrive(row)\n  }\n\n  /** Materialize a registered factory (synchronous; memoized in loadCache). */\n  private materialize(id: string): ClientModuleRecord {\n    const existing = this.loadCache.get(id)\n    if (existing !== undefined) return existing\n    const registered = this.factories.get(id)\n    /* v8 ignore next -- callers check the factory branch before dispatching here. */\n    if (registered === undefined) throw new Error(`client-modules: no registered factory for \"${id}\"`)\n    if (this.materializing.has(id)) {\n      throw new Error(`client-modules: require cycle through \"${id}\" (factory-form CJS cannot deliver partial exports)`)\n    }\n    this.materializing.add(id)\n    try {\n      const edges = new Set<string>()\n      const exports = registered(this.makeRequire(edges))\n      const record: ClientModuleRecord = { id, exports, styles: claimStyles(id), edges }\n      this.loadCache.set(id, record)\n      return record\n    } finally {\n      this.materializing.delete(id)\n    }\n  }\n\n  /**\n   * The synchronous require answered to factories: seed → memoized record →\n   * registered factory. Fetching is async and therefore unreachable\n   * from here; an external dynamic package must have arrived before its\n   * consumer materializes.","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/modules/src/client/system.ts#L136-L172","documentation":"Error \"client-modules: require cycle through \"${id}\" (factory-form CJS cannot deliver partial exports)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/client/modules/src/client/system.ts:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Break the require cycle; factory-form CJS cannot deliver partial exports."],"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"}