{"record":{"id":"734927bf36a30840","repo":"deepseek-ai/deepseek-harness","slug":"client-modules-window-moduleloader-create-cal-734927","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/index.ts","lineNumber":250,"sourceCode":" * The boot protocol as index injection rows. The inline registration queue\n * precedes blocking classic scripts for modules' and runtime's ordinary\n * `lib/client.js` artifacts. Its `create()` method materializes the modules\n * bundle, delegates construction to that bundle, and leaves the same facade\n * in live-registration mode. The graph global follows before the shell reads\n * it.\n * @param graph - the composed entry graph.\n * @returns head rows in execution order: queue script, preload scripts, graph global.\n */\nexport function bootInjections(graph: WebBootGraph): IndexInjection[] {\n  const bootstrapId = JSON.stringify(CLIENT_MODULES_ID)\n  const queue = `(()=>{\nconst pendingQueue=[]\nwindow.__ModuleLoader__={\n  mode:\"queue\",\n  pendingQueue,\n  load(registration){pendingQueue.push(registration)},\n  create(options){\n    if(this.mode!==\"queue\")throw new Error(\"client-modules: window.__ModuleLoader__.create called after module-system boot\")\n    const index=pendingQueue.findIndex(registration=>registration.id===${bootstrapId})\n    const registration=pendingQueue[index]\n    if(registration===undefined)throw new Error(\"client-modules: HTML did not preload ${CLIENT_MODULES_ID}/client.js\")\n    pendingQueue.splice(index,1)\n    const exports=registration.factory(specifier=>{\n      throw new Error('client-modules: ${CLIENT_MODULES_ID}/client.js requested external \"'+specifier+'\" before the module system existed')\n    })\n    if(typeof exports!==\"object\"||exports===null||typeof exports.createClientModuleSystem!==\"function\"||typeof exports.apply!==\"function\"){\n      throw new Error(\"client-modules: ${CLIENT_MODULES_ID}/client.js did not export the bootstrap module face\")\n    }\n    return exports.createClientModuleSystem(this,{id:registration.id,exports},options)\n  }\n}\n})()`\n  const preload = PARSER_PRELOAD_IDS.map(id => graph.entries.find(entry => entry.id === id))\n    .filter((entry): entry is WebBootEntry => entry !== undefined)\n    .map((entry): IndexInjection => ({ kind: 'script-src', placement: 'head', src: entry.url }))\n  return [","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/modules/src/index.ts#L232-L268","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/index.ts:250 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"}