{"record":{"id":"3d5b9ffb5da7dcaa","repo":"gatsbyjs/gatsby","slug":"incompatible-dsg-ssr-executing-environment-functi-3d5b9f","errorCode":null,"errorMessage":"Incompatible DSG/SSR executing environment. Function was built for \"${process.env.GATSBY_FUNCTIONS_PLATFORM}/${process.env.GATSBY_FUNCTIONS_ARCH}\" but is executing on \"${process.platform}/${process.arch}\".\n\nTo generate engines for \"${process.platform}/${process.arch}\" run 'gatsby build --functions-platform=${process.platform} --functions-arch=${process.arch}' or run 'gatsby build' with following envirnment variables:\n\nGATSBY_FUNCTIONS_PLATFORM=${process.platform}\nGATSBY_FUNCTIONS_ARCH=${process.arch}","messagePattern":"Incompatible DSG/SSR executing environment\\. Function was built for \"(.+?)/(.+?)\" but is executing on \"(.+?)/(.+?)\"\\.\n\nTo generate engines for \"(.+?)/(.+?)\" run 'gatsby build --functions-platform=(.+?) --functions-arch=(.+?)' or run 'gatsby build' with following envirnment variables:\n\nGATSBY_FUNCTIONS_PLATFORM=(.+?)\nGATSBY_FUNCTIONS_ARCH=(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/schema/graphql-engine/platform-and-arch-check.ts","lineNumber":5,"sourceCode":"if (\n  process.env.GATSBY_FUNCTIONS_PLATFORM !== process.platform ||\n  process.env.GATSBY_FUNCTIONS_ARCH !== process.arch\n) {\n  throw new Error(\n    `Incompatible DSG/SSR executing environment. Function was built for \"${process.env.GATSBY_FUNCTIONS_PLATFORM}/${process.env.GATSBY_FUNCTIONS_ARCH}\" but is executing on \"${process.platform}/${process.arch}\".` +\n      (process.env.gatsby_executing_command === `serve`\n        ? `\\n\\nIf you are trying to run DSG/SSR engine locally, consider using experimental utility to rebuild functions for your local platform:\\n\\nnode node_modules/gatsby/dist/schema/graphql-engine/standalone-regenerate.js`\n        : ``) +\n      `\\n\\nTo generate engines for \"${process.platform}/${process.arch}\" run 'gatsby build --functions-platform=${process.platform} --functions-arch=${process.arch}' or run 'gatsby build' with following envirnment variables:\\n\\nGATSBY_FUNCTIONS_PLATFORM=${process.platform}\\nGATSBY_FUNCTIONS_ARCH=${process.arch}`\n  )\n}\n","sourceCodeStart":1,"sourceCodeEnd":13,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/schema/graphql-engine/platform-and-arch-check.ts#L1-L13","documentation":"Error \"Incompatible DSG/SSR executing environment. Function was built for \"${process.env.GATSBY_FUNCTIONS_PLATFORM}/${process.env.GATSBY_FUNCTIONS_ARCH}\" but is executing on \"${process.platform}/${process.arch}\".\n\nTo generate engines for \"${process.platform}/${process.arch}\" run 'gatsby build --functions-platform=${process.platform} --functions-arch=${process.arch}' or run 'gatsby build' with following envirnment variables:\n\nGATSBY_FUNCTIONS_PLATFORM=${process.platform}\nGATSBY_FUNCTIONS_ARCH=${process.arch}\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby/src/schema/graphql-engine/platform-and-arch-check.ts:5 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run 'gatsby build --functions-platform=<platform> --functions-arch=<arch>' matching the runtime","Set GATSBY_FUNCTIONS_PLATFORM and GATSBY_FUNCTIONS_ARCH env vars to the executing platform","Build on the same OS/architecture as the deploy target"],"exampleFix":null,"handlingStrategy":"validation","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"}