{"record":{"id":"eb47e2c770adbfb6","repo":"gatsbyjs/gatsby","slug":"could-not-find-page-by-path-action-payload-path","errorCode":null,"errorMessage":"Could not find page by path: ${action.payload.path}","messagePattern":"Could not find page by path: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/reducers/pages.ts","lineNumber":49,"sourceCode":"        )\n      }\n\n      // Add page to the state with the path as key\n      state.set(action.payload.path, action.payload)\n\n      return state\n    }\n\n    case `DELETE_PAGE`: {\n      state.delete(action.payload.path)\n\n      return state\n    }\n\n    case `MATERIALIZE_PAGE_MODE`: {\n      const page = state.get(action.payload.path)\n      if (!page) {\n        throw new Error(`Could not find page by path: ${action.payload.path}`)\n      }\n      page.mode = action.payload.pageMode\n      return state\n    }\n\n    default:\n      return state\n  }\n}\n","sourceCodeStart":31,"sourceCodeEnd":59,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/reducers/pages.ts#L31-L59","documentation":"pagesReducer MATERIALIZE_PAGE_MODE looks up the page by action.payload.path before mutating page.mode; a missing entry means the redux store never had a page at that path — the action was dispatched for a deleted or never-created page.","triggerScenarios":"Thrown at packages/gatsby/src/redux/reducers/pages.ts:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the page is created before mode materialization is dispatched","Check for DELETE_PAGE races with dev-ssr/dsg materialization","Report as a Gatsby bug if it happens with a normal build"],"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"}