yamadashy/repomix · warning

File processor for "${rawFile.path}" failed, using original

Error message

File processor for "${rawFile.path}" failed, using original content (onError: "skip"): ${message}

What it means

A file processor command failed and that processor has onError set to "skip", so processOne keeps the original raw content and logs this warning. The pack continues with untransformed file content instead of aborting.

Source

Thrown at src/core/file/fileProcessorRun.ts:283

          logger.warn(
            `File processor for "${rawFile.path}" produced empty output; the file will be packed as empty. ` +
              `Check that the command writes the transformed content to stdout.`,
          );
        }
        result = { ...rawFile, content };
      } catch (error) {
        const message = describeProcessorError(error, timeout);
        if (onError !== 'skip') {
          aborted = true;
          throw new RepomixError(
            `File processor failed for "${rawFile.path}".\n` +
              `  Pattern: ${processor.pattern}\n` +
              `  Command: ${processor.command}\n` +
              `  Error: ${message}\n` +
              `  Set "onError": "skip" on this processor to fall back to the original content instead.`,
          );
        }
        logger.warn(
          `File processor for "${rawFile.path}" failed, using original content (onError: "skip"): ${message}`,
        );
        result = rawFile;
        skipped = true;
      } finally {
        // Remove this file's temp file promptly so disk use scales with concurrency,
        // not matched-file count. The tempDir itself is still removed in the outer
        // finally as a safety net.
        await fs.rm(tempFilePath, { force: true }).catch(() => {});
      }

      // Progress is reported outside the run try/catch so a throwing progressCallback
      // is not misread as a processor failure (which, under onError: "skip", would
      // discard the successfully transformed content). Runs for success and skip alike.
      completed++;
      progressCallback(
        `Processing file with command... (${completed}/${matchedCount}) ${pc.dim(rawFile.path)}${skipped ? ' (skipped)' : ''}`,
      );

View on GitHub (pinned to f465ad9093)

Solutions

  1. Run the processor command manually on the file to see the real failure and fix the command or environment.
  2. Install or fix the tool the command invokes (check PATH, npx availability, version).
  3. If failing on specific files is acceptable, ignore the warning — original content is used by design.
  4. Narrow the processor pattern so it only matches files the command supports, or switch onError to "warn" to see full pattern/command/error context.

Example fix

// before: tool missing, onError skip
"command": "npx prettier --stdin-filepath $FILE"
// after: ensure dependency exists
"command": "npx -y prettier --stdin-filepath $FILE"  # and verify it runs: cat file | npx -y prettier --stdin-filepath file.ts
Defensive patterns

Strategy: try-catch

Validate before calling

require('child_process').execSync(processor.command.replace('$FILE', 'sample.ts'), { stdio: 'pipe' }); // throws early if tool missing/broken

Try / catch

try { result = await runProcessor(file, processor); } catch (e) {
  logger.warn(`processor failed for ${file.path}, keeping original: ${e.message}`);
  result = file; // onError: skip semantics
}

Prevention

When it happens

Trigger: The processor command exits nonzero or throws (spawn error, command not found, script error) while its config sets "onError": "skip" — see the sibling error which hints at adding that option.

Common situations: Formatter/linter binaries not installed on the machine; commands failing only on certain files (syntax errors, unsupported syntax versions); PATH differences between shell and repomix environment; Windows/Unix command name mismatches.

Related errors


AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29). Data as JSON: /api/errors/7d33328956ae97d6. Report an issue: GitHub.