{"record":{"id":"7d33328956ae97d6","repo":"yamadashy/repomix","slug":"file-processor-for-rawfile-path-failed-using","errorCode":null,"errorMessage":"File processor for \"${rawFile.path}\" failed, using original content (onError: \"skip\"): ${message}","messagePattern":"File processor for \"(.+?)\" failed, using original content \\(onError: \"skip\"\\): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/file/fileProcessorRun.ts","lineNumber":283,"sourceCode":"          logger.warn(\n            `File processor for \"${rawFile.path}\" produced empty output; the file will be packed as empty. ` +\n              `Check that the command writes the transformed content to stdout.`,\n          );\n        }\n        result = { ...rawFile, content };\n      } catch (error) {\n        const message = describeProcessorError(error, timeout);\n        if (onError !== 'skip') {\n          aborted = true;\n          throw new RepomixError(\n            `File processor failed for \"${rawFile.path}\".\\n` +\n              `  Pattern: ${processor.pattern}\\n` +\n              `  Command: ${processor.command}\\n` +\n              `  Error: ${message}\\n` +\n              `  Set \"onError\": \"skip\" on this processor to fall back to the original content instead.`,\n          );\n        }\n        logger.warn(\n          `File processor for \"${rawFile.path}\" failed, using original content (onError: \"skip\"): ${message}`,\n        );\n        result = rawFile;\n        skipped = true;\n      } finally {\n        // Remove this file's temp file promptly so disk use scales with concurrency,\n        // not matched-file count. The tempDir itself is still removed in the outer\n        // finally as a safety net.\n        await fs.rm(tempFilePath, { force: true }).catch(() => {});\n      }\n\n      // Progress is reported outside the run try/catch so a throwing progressCallback\n      // is not misread as a processor failure (which, under onError: \"skip\", would\n      // discard the successfully transformed content). Runs for success and skip alike.\n      completed++;\n      progressCallback(\n        `Processing file with command... (${completed}/${matchedCount}) ${pc.dim(rawFile.path)}${skipped ? ' (skipped)' : ''}`,\n      );","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/yamadashy/repomix/blob/f465ad909315a22120636baf03fa5e28701a50cb/src/core/file/fileProcessorRun.ts#L265-L301","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Run the processor command manually on the file to see the real failure and fix the command or environment.","Install or fix the tool the command invokes (check PATH, npx availability, version).","If failing on specific files is acceptable, ignore the warning — original content is used by design.","Narrow the processor pattern so it only matches files the command supports, or switch onError to \"warn\" to see full pattern/command/error context."],"exampleFix":"// before: tool missing, onError skip\n\"command\": \"npx prettier --stdin-filepath $FILE\"\n// after: ensure dependency exists\n\"command\": \"npx -y prettier --stdin-filepath $FILE\"  # and verify it runs: cat file | npx -y prettier --stdin-filepath file.ts","handlingStrategy":"try-catch","validationCode":"require('child_process').execSync(processor.command.replace('$FILE', 'sample.ts'), { stdio: 'pipe' }); // throws early if tool missing/broken","typeGuard":null,"tryCatchPattern":"try { result = await runProcessor(file, processor); } catch (e) {\n  logger.warn(`processor failed for ${file.path}, keeping original: ${e.message}`);\n  result = file; // onError: skip semantics\n}","preventionTips":["Ensure processor tools are installed and on PATH in the repomix environment.","Verify the command per-file on files with unusual syntax.","Use onError \"warn\" first to surface full pattern/command/error context, then choose skip.","Pin tool versions (npx -y pkg@version) to avoid environment drift."],"tags":["file-processor","command-failed","fallback","config"],"backgroundTag":"command-not-found","analyzedSha":"f465ad909315a22120636baf03fa5e28701a50cb","analyzedAt":"2026-08-29T01:27:42.024Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}