Skip to content

Dead code detection crashes with TypeError: issues.files is not iterable #132

@Mergemat

Description

@Mergemat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions