{"record":{"id":"c1264b4c3f4c4998","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-page-creator-12110","errorCode":"gatsby-plugin-page-creator_12110","errorMessage":"${e.message}","messagePattern":"\\$\\{e\\.message\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-page-creator/src/gatsby-node.ts","lineNumber":297,"sourceCode":"        }\n      },\n      removedPath => {\n        // Delete the page for the now deleted component.\n        try {\n          const componentPath = systemPath.join(pagesDirectory, removedPath)\n          store.getState().pages.forEach(page => {\n            if (page.component === componentPath) {\n              deletePage({\n                path: page.path,\n                component: componentPath,\n              })\n            }\n          })\n          knownFiles.delete(removedPath)\n\n          pluginInstance.templateFileRemoved(componentPath)\n        } catch (e) {\n          reporter.panic({\n            id: prefixId(CODES.FileSystemRemove),\n            context: {\n              sourceMessage: e.message,\n            },\n          })\n        }\n      }\n    ).then(() => doneCb(null, null))\n\n    emitter.on(`DELETE_NODE`, action => {\n      if (action.payload?.id) {\n        if (pluginInstance.trackedTypes.has(action.payload?.internal?.type)) {\n          pluginInstance.changedNodesSinceLastPageCreation.deleted.set(\n            action.payload.id,\n            {\n              id: action.payload.id,\n              contentDigest: action.payload.internal.contentDigest,\n            }","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-plugin-page-creator/src/gatsby-node.ts#L279-L315","documentation":"In gatsby-node.ts:278-300, the file watcher's removedPath callback deletes pages whose component matches the deleted file path. If an exception occurs during page deletion (deletePage call or store iteration), the catch block wraps it with id CODES.FileSystemRemove and passes e.message as sourceMessage. This is the remove-side counterpart of error 207.","triggerScenarios":"A file is deleted from the pages directory during develop mode, and the page cleanup logic throws — e.g. store state inconsistency, a page reference that doesn't exist, or an internal Gatsby state mutation error.","commonSituations":"Rapid file deletion and recreation during development causing race conditions. Gatsby internal store state inconsistency. Concurrent file operations triggering watcher callbacks in unexpected order.","solutions":["Read the e.message in the error output for the underlying cause","Restart gatsby develop to reset internal state","If the issue persists, check for file system event storms (tools like Dropbox/IDE watchers conflicting)","Ensure no other plugin is mutating the same pages concurrently"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// The plugin already wraps file-remove logic in try-catch internally.\n// As a consumer, minimize rapid file create/delete cycles during develop.\n// If the error persists, restart gatsby develop to reset internal state.\n// There is no caller-side catch to add — this is internal to the watcher.","preventionTips":["Avoid rapid file add/delete cycles in the pages directory during develop","Disable conflicting file watchers (IDE, Dropbox) on the pages directory","Restart gatsby develop if internal state becomes inconsistent"],"tags":["filesystem","watcher","page-creator","runtime-error"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}