Skip to content

React version detection fails when dependencies are declared via Bun catalog: #87

@NimmLor

Description

@NimmLor

react-doctor cannot resolve the React version when a project uses Bun workspace catalogs ("react": "catalog:"), even though the concrete version is defined in the root workspace catalog.

Environment

  • react-doctor: 0.0.29
  • Package manager: Bun (1.3.x)
  • Framework: Vite
  • Language: TypeScript
  • Monorepo with root package.json workspace catalog

Reproduction

  1. In root package.json, define:
    {
      "workspaces": {
        "packages": ["apps/*"],
        "catalog": {
          "react": "^19.1.4",
          "react-dom": "^19.1.4"
        }
      }
    }
  2. In app package.json (e.g. apps/web/package.json), set:
    {
      "dependencies": {
        "react": "catalog:",
        "react-dom": "catalog:"
      }
    }
  3. Run:
    cd apps/web && npx -y react-doctor@latest .

Actual behavior

Output shows React version detection as unresolved:

bunx -y react-doctor@latest .
react-doctor v0.0.29

✔ Select projects to scan › web
Scanning /home/lorenz/some-repo/apps/web...

✔ Detecting framework. Found Vite.
✔ Detecting React version. Found React catalog:.
✔ Detecting language. Found TypeScript.
✔ Detecting React Compiler. Not found.
✔ Found 156 source files.

(then continues scanning/lint/dead code)

Expected behavior

react-doctor should resolve catalog: references to the concrete version from the Bun workspace root catalog and report the actual React version (e.g. ^19.1.4 / installed version).

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