gatsbyjs/gatsby · error

gatsby-plugin-page-creator_12110

gatsby-plugin-page-creator_12110

Error message

${e.message}

What it means

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.

Source

Thrown at packages/gatsby-plugin-page-creator/src/gatsby-node.ts:297

        }
      },
      removedPath => {
        // Delete the page for the now deleted component.
        try {
          const componentPath = systemPath.join(pagesDirectory, removedPath)
          store.getState().pages.forEach(page => {
            if (page.component === componentPath) {
              deletePage({
                path: page.path,
                component: componentPath,
              })
            }
          })
          knownFiles.delete(removedPath)

          pluginInstance.templateFileRemoved(componentPath)
        } catch (e) {
          reporter.panic({
            id: prefixId(CODES.FileSystemRemove),
            context: {
              sourceMessage: e.message,
            },
          })
        }
      }
    ).then(() => doneCb(null, null))

    emitter.on(`DELETE_NODE`, action => {
      if (action.payload?.id) {
        if (pluginInstance.trackedTypes.has(action.payload?.internal?.type)) {
          pluginInstance.changedNodesSinceLastPageCreation.deleted.set(
            action.payload.id,
            {
              id: action.payload.id,
              contentDigest: action.payload.internal.contentDigest,
            }

View on GitHub (pinned to 8b06340921)

Solutions

  1. Read the e.message in the error output for the underlying cause
  2. Restart gatsby develop to reset internal state
  3. If the issue persists, check for file system event storms (tools like Dropbox/IDE watchers conflicting)
  4. Ensure no other plugin is mutating the same pages concurrently
Defensive patterns

Strategy: try-catch

Try / catch

// The plugin already wraps file-remove logic in try-catch internally.
// As a consumer, minimize rapid file create/delete cycles during develop.
// If the error persists, restart gatsby develop to reset internal state.
// There is no caller-side catch to add — this is internal to the watcher.

Prevention

When it happens

Trigger: 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.

Common situations: Rapid file deletion and recreation during development causing race conditions. Gatsby internal store state inconsistency. Concurrent file operations triggering watcher callbacks in unexpected order.

Related errors


AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13). Data as JSON: /api/errors/c1264b4c3f4c4998. Report an issue: GitHub.