{"record":{"id":"16d6344a3b5832cc","repo":"gatsbyjs/gatsby","slug":"err","errorCode":null,"errorMessage":"${err}","messagePattern":"\\$\\{err\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/gatsby/src/schema/graphql-engine/standalone-regenerate.ts","lineNumber":68,"sourceCode":"  // recompile\n  const buildActivityTimer = reporter.activityTimer(\n    `(Re)Building Rendering Engines`\n  )\n  try {\n    buildActivityTimer.start()\n    await Promise.all([\n      createGraphqlEngineBundle(process.cwd(), reporter, true),\n      createPageSSRBundle({\n        rootDir: process.cwd(),\n        components: store.getState().components,\n        staticQueriesByTemplate: state.staticQueriesByTemplate,\n        webpackCompilationHash: state.webpackCompilationHash, // we set webpackCompilationHash above\n        reporter,\n        isVerbose: state.program.verbose,\n      }),\n    ])\n  } catch (err) {\n    buildActivityTimer.panic(err)\n  } finally {\n    buildActivityTimer.end()\n  }\n\n  await validateEnginesWithActivity(process.cwd())\n\n  reporter.info(`Rebuilding Rendering Engines finished`)\n}\n\nrun()\n","sourceCodeStart":50,"sourceCodeEnd":79,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby/src/schema/graphql-engine/standalone-regenerate.ts#L50-L79","documentation":"This error occurs during standalone engine regeneration -- a dev-only script that re-bundles the GraphQL query engine and page-SSR bundle after a successful gatsby build. The panic propagates any webpack bundling failure from createGraphqlEngineBundle or createPageSSRBundle (e.g. syntax errors, missing modules, webpack config issues). It is fatal: it terminates the regeneration process.","triggerScenarios":"Running `node node_modules/gatsby/dist/schema/graphql-engine/standalone-regenerate.js` when the project has a webpack-breaking change in source files, a missing dependency, or a stale/incomplete .cache from a prior build on a different platform/arch.","commonSituations":"Developer edited a GraphQL plugin or page component with a syntax error then ran standalone-regenerate. Cache corruption after switching Node versions or OS. A required node module was removed from node_modules but is still referenced by the engine bundle entry.","solutions":["Run a full `gatsby clean` then `gatsby build` to regenerate .cache and the initial bundles from scratch before re-running standalone-regenerate.","Inspect the inner `err` object in the panic output -- it contains the webpack error (module not found, syntax error, etc.); fix the underlying source issue.","Ensure all dependencies are installed (npm install or yarn) and that Node version matches the one used for the original build.","Delete .cache/webpack/query-engine and .cache/webpack/page-ssr manually and re-run the script."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before running standalone-regenerate, verify a prior build exists\nconst fs = require('fs-extra')\nconst hasPriorBuild = await fs.pathExists('.cache/webpack') && await fs.pathExists('public')\nif (!hasPriorBuild) {\n  console.error('Run `gatsby build` first to warm up the cache')\n  process.exit(1)\n}","typeGuard":null,"tryCatchPattern":"// Wrap the regeneration invocation and surface webpack errors\ntry {\n  await import('gatsby/dist/schema/graphql-engine/standalone-regenerate')\n} catch (err) {\n  console.error('Engine regeneration failed:', err.message)\n  // The inner err has the webpack-specific failure details\n  process.exit(1)\n}","preventionTips":["Always run a full gatsby build before using standalone-regenerate.","Keep Node version consistent across builds on the same .cache.","Run gatsby clean if switching platforms or Node versions."],"tags":["webpack","build","dev-only","bundling"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}