{"record":{"id":"97cf51934ec111ea","repo":"gatsbyjs/gatsby","slug":"there-is-no-worker-with-workerid-id","errorCode":null,"errorMessage":"There is no worker with \"${workerId}\" id.","messagePattern":"There is no worker with \"(.+?)\" id\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby-worker/src/index.ts","lineNumber":482,"sourceCode":"    ...args: Array<unknown>\n  ): Array<Promise<unknown>> {\n    return this.workers.map(workerInfo =>\n      this.scheduleWork(\n        new TaskInfo({ assignedToWorker: workerInfo, functionName, args })\n      )\n    )\n  }\n\n  onMessage(\n    listener: (msg: MessagesFromChild, workerId: number) => void\n  ): void {\n    this.listeners.push(listener)\n  }\n\n  sendMessage(msg: MessagesFromParent, workerId: number): void {\n    const worker = this.workers[workerId - 1]\n    if (!worker) {\n      throw new Error(`There is no worker with \"${workerId}\" id.`)\n    }\n\n    const poolMsg: ParentMessageUnion = [CUSTOM_MESSAGE, ++this.counter, msg]\n    worker.send(poolMsg)\n  }\n}\n\nexport * from \"./child\"\n","sourceCodeStart":464,"sourceCodeEnd":491,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-worker/src/index.ts#L464-L491","documentation":"Worker pool sendMessage indexes this.workers by workerId-1; a falsy entry means the requested worker id is out of range or that worker already exited. It is an internal messaging guard between the Gatsby main process and its child workers.","triggerScenarios":"Thrown at packages/gatsby-worker/src/index.ts:482 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify workerId was obtained from pool.onMessage/worker creation","Avoid sending messages after workers have been killed or the pool tore down","Check for premature worker exits earlier in the log"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}