deepseek-ai/deepseek-harness · error
client-modules: window.__ModuleLoader__.create called after
Error message
client-modules: window.__ModuleLoader__.create called after module-system boot
What it means
Error "client-modules: window.__ModuleLoader__.create called after module-system boot" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/client/modules/src/index.ts:250
* The boot protocol as index injection rows. The inline registration queue
* precedes blocking classic scripts for modules' and runtime's ordinary
* `lib/client.js` artifacts. Its `create()` method materializes the modules
* bundle, delegates construction to that bundle, and leaves the same facade
* in live-registration mode. The graph global follows before the shell reads
* it.
* @param graph - the composed entry graph.
* @returns head rows in execution order: queue script, preload scripts, graph global.
*/
export function bootInjections(graph: WebBootGraph): IndexInjection[] {
const bootstrapId = JSON.stringify(CLIENT_MODULES_ID)
const queue = `(()=>{
const pendingQueue=[]
window.__ModuleLoader__={
mode:"queue",
pendingQueue,
load(registration){pendingQueue.push(registration)},
create(options){
if(this.mode!=="queue")throw new Error("client-modules: window.__ModuleLoader__.create called after module-system boot")
const index=pendingQueue.findIndex(registration=>registration.id===${bootstrapId})
const registration=pendingQueue[index]
if(registration===undefined)throw new Error("client-modules: HTML did not preload ${CLIENT_MODULES_ID}/client.js")
pendingQueue.splice(index,1)
const exports=registration.factory(specifier=>{
throw new Error('client-modules: ${CLIENT_MODULES_ID}/client.js requested external "'+specifier+'" before the module system existed')
})
if(typeof exports!=="object"||exports===null||typeof exports.createClientModuleSystem!=="function"||typeof exports.apply!=="function"){
throw new Error("client-modules: ${CLIENT_MODULES_ID}/client.js did not export the bootstrap module face")
}
return exports.createClientModuleSystem(this,{id:registration.id,exports},options)
}
}
})()`
const preload = PARSER_PRELOAD_IDS.map(id => graph.entries.find(entry => entry.id === id))
.filter((entry): entry is WebBootEntry => entry !== undefined)
.map((entry): IndexInjection => ({ kind: 'script-src', placement: 'head', src: entry.url }))
return [View on GitHub (pinned to b150a551b8)
Solutions
- Call __ModuleLoader__.create before module-system boot completes.
When it happens
Trigger: Thrown at packages/client/modules/src/index.ts:250 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/734927bf36a30840.
Report an issue: GitHub.