{"record":{"id":"330d9032bb37f9f1","repo":"deepseek-ai/deepseek-harness","slug":"client-modules-window-moduleloader-create-cal","errorCode":null,"errorMessage":"client-modules: window.__ModuleLoader__.create called after module-system boot","messagePattern":"client-modules: window\\.__ModuleLoader__\\.create called after module-system boot","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/modules/src/client/system.ts","lineNumber":93,"sourceCode":"    this.loadBundle = options.loadBundle ?? defaultLoadBundle\n\n    for (const row of options.manifest.modules) {\n      if (this.graphRows.has(row.id)) throw new Error(`client-modules: duplicate graph entry \"${row.id}\"`)\n      this.graphRows.set(row.id, row)\n    }\n\n    const bootstrapId = stripClientSuffix(options.bootstrapModule.id)\n    this.bootstrapIds.add(bootstrapId)\n    this.loadCache.set(bootstrapId, {\n      id: bootstrapId,\n      exports: options.bootstrapModule.exports,\n      styles: [],\n      edges: new Set(),\n    })\n\n    const target = options.registrationTarget\n    if (target.mode !== 'queue') {\n      throw new Error('client-modules: window.__ModuleLoader__.create called after module-system boot')\n    }\n    const pending = target.pendingQueue.splice(0)\n    // Switch first: a bundle that executes while pending registrations drain\n    // must register live rather than append behind the drain.\n    target.mode = 'live'\n    target.load = (registration) => { this.register(registration) }\n    for (const registration of pending) target.load(registration)\n  }\n\n  /** Register one bundle factory, rejecting a script that executes twice without invalidation. */\n  private register(registration: ClientBundleRegistration): void {\n    const id = stripClientSuffix(registration.id)\n    if (this.bootstrapIds.has(id) || this.factories.has(id)) {\n      throw new Error(`client-modules: duplicate factory registration for \"${registration.id}\" (bundle executed twice without invalidate?)`)\n    }\n    this.factories.set(id, registration.factory)\n  }\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/modules/src/client/system.ts#L75-L111","documentation":"Error \"client-modules: window.__ModuleLoader__.create called after module-system boot\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/client/modules/src/client/system.ts:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call __ModuleLoader__.create before module-system boot completes."],"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"}