{"record":{"id":"40c0ecf0a5b953fb","repo":"gatsbyjs/gatsby","slug":"there-was-an-error-compiling-the-html-js-component-40c0ec","errorCode":null,"errorMessage":"There was an error compiling the html.js component for the development server.\nSee our docs page on debugging HTML builds for help https://gatsby.dev/debug-html","messagePattern":"There was an error compiling the html\\.js component for the development server\\.\nSee our docs page on debugging HTML builds for help https://gatsby\\.dev/debug-html","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/utils/start-server.ts","lineNumber":113,"sourceCode":"        program,\n        Stage.DevelopHTML,\n        activity.span\n      )\n      await doBuildPages(\n        rendererPath,\n        [`/`],\n        activity,\n        workerPool,\n        Stage.DevelopHTML\n      )\n      // close the compiler\n      await close()\n    } catch (err) {\n      if (err.name !== `WebpackError`) {\n        report.panic(err)\n        return\n      }\n      report.panic(\n        report.stripIndent`\n          There was an error compiling the html.js component for the development server.\n          See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html\n        `,\n        err\n      )\n    }\n  }\n  const indexHTMLActivity = report.phantomActivity(`building index.html`, {})\n\n  let pageRenderer: string\n  if (process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {\n    const { buildRenderer } = require(`../commands/build-html`)\n    pageRenderer = (await buildRenderer(program, Stage.DevelopHTML))\n      .rendererPath\n    const { initDevWorkerPool } = require(`./dev-ssr/render-dev-html`)\n    initDevWorkerPool()\n  } else {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/utils/start-server.ts#L95-L131","documentation":"Fires in createIndexHtml when the develop-HTML webpack build throws a WebpackError (non-webpack errors are re-panicked unchanged): it flags a compile-time failure of the dev server's html.js renderer, not a runtime page error.","triggerScenarios":"Thrown at packages/gatsby/src/utils/start-server.ts:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Follow the debugging guide at https://gatsby.dev/debug-html","Fix the component/code error reported by webpack in the HTML build (often in gatsby-ssr or invalid SSR output from a page/component)"],"exampleFix":null,"handlingStrategy":"try-catch","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"}