react-doctor crashes in the dead-code step on my project with:
TypeError: issues.files is not iterable
Output:
✖ Dead code detection failed (non-fatal, skipping).
TypeError: issues.files is not iterable
Repro:
bunx react-doctor@latest . --verbose
Repo details:
- Next.js
- React 19
- TypeScript
- Bun
I traced this locally to runKnip() iterating issues.files directly. In the installed Knip types, issues.files is not always an iterable list of file paths, so the dead-code pass blows up before results are returned.
Related:
There also seems to be a separate lint-side config drift issue around generated oxlint rules, but this report is specifically about the Knip/dead-code crash.
Expected:
- dead-code detection completes, or safely skips malformed/variant
issues.files output without throwing
react-doctorcrashes in the dead-code step on my project with:TypeError: issues.files is not iterable
Output:
Repro:
bunx react-doctor@latest . --verboseRepo details:
I traced this locally to
runKnip()iteratingissues.filesdirectly. In the installed Knip types,issues.filesis not always an iterable list of file paths, so the dead-code pass blows up before results are returned.Related:
Detecting dead codestep with no output and non-zero exit code #77There also seems to be a separate lint-side config drift issue around generated oxlint rules, but this report is specifically about the Knip/dead-code crash.
Expected:
issues.filesoutput without throwing