parcel-bundler/parcel · warning · FSBailoutError

Responding to file system events exceeded threshold, start w

Error message

Responding to file system events exceeded threshold, start with empty cache.

What it means

During incremental builds Parcel processes file-watcher events. It estimates the cost of responding to the event batch (`duration * (events.length >> 8)`) and compares it to a threshold. When the predicted work exceeds the threshold, it raises an `FSBailoutError` and falls back to a clean-cache build rather than spending excessive time invalidating. This is a soft bailout, not a hard failure — the build continues from scratch.

Source

Thrown at packages/core/core/src/RequestTracker.js:876

    let predictedTime = 0;
    let startTime = Date.now();

    for (let {path: _path, type} of events) {
      if (++count === 256) {
        let duration = Date.now() - startTime;
        predictedTime = duration * (events.length >> 8);
        if (predictedTime > threshold) {
          logger.warn({
            origin: '@parcel/core',
            message:
              'Building with clean cache. Cache invalidation took too long.',
            meta: {
              trackableEvent: 'cache_invalidation_timeout',
              watcherEventCount: events.length,
              predictedTime,
            },
          });
          throw new FSBailoutError(
            'Responding to file system events exceeded threshold, start with empty cache.',
          );
        }
      }

      let _filePath = toProjectPath(options.projectRoot, _path);
      let filePath = fromProjectPathRelative(_filePath);
      let hasFileRequest = this.hasContentKey(filePath);

      // If we see a 'create' event for the project root itself,
      // this means the project root was moved and we need to
      // re-run all requests.
      if (type === 'create' && filePath === '') {
        logger.verbose({
          origin: '@parcel/core',
          message:
            'Watcher reported project root create event. Invalidate all nodes.',
          meta: {

View on GitHub (pinned to 59484858a1)

Solutions

  1. Treat as informational — the next build will use a clean cache automatically.
  2. Reduce watcher noise by ignoring volatile dirs (node_modules, build output, .git) in the watcher config.
  3. If it recurs, run `parcel build --no-cache` once to reset, then continue normally.
Defensive patterns

Strategy: fallback

Validate before calling

// This is a watcher-driven bailout; pre-empt by reducing event volume.
// Configure the watcher to ignore volatile directories.
new Parcel({
  // ensure watcher ignores node_modules / dist / .git
});

Prevention

When it happens

Trigger: A large batch of filesystem events (e.g. branch switch, mass rename, dependency reinstall) that floods the watcher beyond the cost threshold.

Common situations: Switching git branches with many changed files; `npm install` churning node_modules; large monorepo checkouts; deleting and recreating build trees.

Related errors


AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13). Data as JSON: /api/errors/4de766c03b92b587. Report an issue: GitHub.