{"record":{"id":"975c42bcc3ed6681","repo":"gatsbyjs/gatsby","slug":"calling-createpagedependency-directly-from-actio","errorCode":null,"errorMessage":"Calling \"createPageDependency\" directly from actions in deprecated. Use \"createPageDependency\" from \"gatsby/dist/redux/actions/add-page-dependency\".","messagePattern":"Calling \"createPageDependency\" directly from actions in deprecated\\. Use \"createPageDependency\" from \"gatsby/dist/redux/actions/add-page-dependency\"\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/actions/public.js","lineNumber":1383,"sourceCode":"\n/**\n * Create a dependency between a page and data.\n *\n * @param {Object} $0\n * @param {string} $0.path the path to the page\n * @param {string} $0.nodeId A node ID\n * @param {string} $0.connection A connection type\n * @private\n */\nactions.createPageDependency = (\n  {\n    path,\n    nodeId,\n    connection,\n  }: { path: string, nodeId: string, connection: string },\n  plugin: string = ``\n) => {\n  console.warn(\n    `Calling \"createPageDependency\" directly from actions in deprecated. Use \"createPageDependency\" from \"gatsby/dist/redux/actions/add-page-dependency\".`\n  )\n  return {\n    type: `CREATE_COMPONENT_DEPENDENCY`,\n    plugin,\n    payload: [\n      {\n        path,\n        nodeId,\n        connection,\n      },\n    ],\n  }\n}\n\n/**\n * Record that a page was visited on the server..\n *","sourceCodeStart":1365,"sourceCodeEnd":1401,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/actions/public.js#L1365-L1401","documentation":"A deprecated shim on the actions object: calling actions.createPageDependency directly triggers this console warning. The implementation moved to a dedicated module (gatsby/dist/redux/actions/add-page-dependency) to break import cycles; the call still works but should migrate. This is a generic deprecation sentinel, not a data error.","triggerScenarios":"Thrown at packages/gatsby/src/redux/actions/public.js:1383 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Import createPageDependency from `gatsby/dist/redux/actions/add-page-dependency` instead of destructuring it from actions","Update custom plugins/source plugins making this call","Suppress only after confirming no first-party code calls the deprecated action"],"exampleFix":null,"handlingStrategy":"fallback","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"}