gatsbyjs/gatsby · error
Found a duplicate ID in WordPress - this means you will have
Error message
Found a duplicate ID in WordPress - this means you will have fewer nodes in Gatsby than in WordPress. This will need to be resolved in WP by identifying and fixing the underlying bug with your WP plugins or custom code.
What it means
Error "Found a duplicate ID in WordPress - this means you will have fewer nodes in Gatsby than in WordPress. This will need to be resolved in WP by identifying and fixing the underlying bug with your WP plugins or custom code." thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes-paginated.js:114
if (nodes && nodes.length) {
nodes.forEach(node => {
const existingId = idSet.has(node.id)
if (
existingId &&
// when the since variable is present
// we're fetching lists of node updates from WPGQL
// in that case we don't need to worry about logging duplicates
!(`since` in variables)
) {
const existingNode = allContentNodes.find(
innerNode => innerNode.id === node.id
)
if (existingNode) {
if (!hasLoggedDuplicateMessage) {
hasLoggedDuplicateMessage = true
helpers.reporter.warn(
formatLogMessage(
`Found a duplicate ID in WordPress - this means you will have fewer nodes in Gatsby than in WordPress. This will need to be resolved in WP by identifying and fixing the underlying bug with your WP plugins or custom code.`
)
)
}
if (node?.databaseId && node?.uri && existingNode?.uri) {
helpers.reporter.info(
formatLogMessage(
`Node with ID ${node.databaseId}/${node.id} of type ${node.__typename} was fetched multiple times. This is a WPGraphQL bug where pagination returns duplicate nodes.`
)
)
}
}
} else {
idSet.add(node.id)
}
View on GitHub (pinned to e85d62f177)
Solutions
- Audit WordPress content for posts/terms sharing the same global id — commonly caused by a conflicting plugin or custom import creating duplicates
- Deactivate recently added plugins that mutate IDs and re-sync
- If duplicates are legitimate in WP, deduplicate or fix the exporting code so WPGQL returns unique ids
- Re-run sourcing after fixing; nodes missing in Gatsby will then be created
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes-paginated.js:114 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/33342bcc93e4d368.
Report an issue: GitHub.