Skip to content

react-doctor fails with pnpm catalog: protocol in package.json #116

@swijckmans

Description

@swijckmans

Bug

react-doctor v0.0.30 fails with No React dependency found in package.json when the project uses pnpm's catalog: protocol for dependency versions.

Reproduction

// package.json
{
  "dependencies": {
    "react": "catalog:",
    "react-dom": "catalog:"
  }
}
# pnpm-workspace.yaml
catalog:
  react: 19.2.4
  react-dom: 19.2.4
$ npx react-doctor@0.0.30 .
react-doctor v0.0.30
Something went wrong. Please check the error below for more details.
No React dependency found in package.json

Expected

react-doctor should recognize "catalog:" as a valid version specifier (resolved by pnpm at install time) and either:

  1. Parse the actual version from pnpm-workspace.yaml
  2. Fall back to the installed version in node_modules/react/package.json

Context

The catalog: protocol is a pnpm workspace feature for centralizing dependency versions. It's been stable since pnpm v9.5. Our CI (GitHub Actions) runs npx -y react-doctor@latest and it has been failing on every branch since ~April 1, 2026.

Environment

  • react-doctor: 0.0.30
  • pnpm: 10.x
  • Node: 24.x
  • React: 19.2.4 (via catalog)

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