{"record":{"id":"c19dd4c4bbc78c04","repo":"gatsbyjs/gatsby","slug":"action-createpage-was-called-outside-of-its-expect","errorCode":null,"errorMessage":"Action createPage was called outside of its expected asynchronous lifecycle createPages in ${plugin.name}.\nEnsure that you return a Promise from createPages and are awaiting any asynchronous method invocations (like graphql or http requests).\nFor more info and debugging tips: see https://gatsby.dev/sync-actions","messagePattern":"Action createPage was called outside of its expected asynchronous lifecycle createPages in (.+?)\\.\nEnsure that you return a Promise from createPages and are awaiting any asynchronous method invocations \\(like graphql or http requests\\)\\.\nFor more info and debugging tips: see https://gatsby\\.dev/sync-actions","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/utils/api-runner-node.js","lineNumber":416,"sourceCode":"                `createPages`\n              )} in ${chalk.bold(plugin.name)}.\n              Ensure that you return a Promise from ${chalk.bold(\n                `createPages`\n              )} and are awaiting any asynchronous method invocations (like ${chalk.bold(\n                `graphql`\n              )} or http requests).\n              For more info and debugging tips: see ${chalk.bold(\n                `https://gatsby.dev/sync-actions`\n              )}\n            `),\n            ]\n\n            const possiblyCodeFrame = getNonGatsbyCodeFrameFormatted()\n            if (possiblyCodeFrame) {\n              warning.push(possiblyCodeFrame)\n            }\n\n            reporter.warn(warning.join(`\\n\\n`))\n            alreadyDisplayed = true\n          }\n        },\n      }\n    }\n\n    const localReporter = getLocalReporter({ activity, reporter })\n\n    const runningActivities = new Set()\n\n    const extendedLocalReporter = extendLocalReporterToCatchPluginErrors({\n      reporter: localReporter,\n      pluginName: plugin.name,\n      runningActivities,\n    })\n\n    const endInProgressActivitiesCreatedByThisRun = () => {\n      runningActivities.forEach(activity => activity.end())","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/utils/api-runner-node.js#L398-L434","documentation":"Error \"Action createPage was called outside of its expected asynchronous lifecycle createPages in ${plugin.name}.\nEnsure that you return a Promise from createPages and are awaiting any asynchronous method invocations (like graphql or http requests).\nFor more info and debugging tips: see https://gatsby.dev/sync-actions\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby/src/utils/api-runner-node.js:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Return a Promise from createPages and await all graphql calls and async work before returning","Ensure createPage/createPages actions are not called from un-awaited promises or setTimeout callbacks","Use https://gatsby.dev/sync-actions debugging tips to locate the offending call site"],"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"}