Skip to content

fix(ci): react-doctor action fails with binary not found on validate-mobile #148

Description

@masch

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs status:approved before a PR can be opened

Bug Description

The React Doctor CI step in validate-mobile is failing with sh: 1: react-doctor: not found. The millionco/react-doctor@v1.1.1 GitHub Action cannot find the react-doctor binary it attempts to install via npm.

Failed run: https://github.com/masch/sonora/actions/runs/27886059673/job/82521753286

Steps to Reproduce

  1. Open or sync a PR that changes files in apps/mobile
  2. The validate-mobile job runs
  3. The millionco/react-doctor@v1.1.1 step fails with the binary not found error

Actual Behavior

sh: 1: react-doctor: not found

The action's internal npm-based installation of react-doctor fails, and the workflow step exits with code 1.

Expected Behavior

React Doctor should run successfully and report diagnostics on the PR changes.

Proposed Solutions

Two approaches were identified:

Option A: Update the GitHub Action to v2 + set directory
The action is pinned to v1.1.1 but v2.2.2 is available. Updating plus setting directory: apps/mobile may fix the installation path. Risk: v2 may have breaking input changes.

Option B: Replace the action with a direct bun command
Skip the composite action entirely and use the already-installed workspace dependency:

- run: bun --filter @sonora/mobile exec react-doctor -- --verbose --scope changed --blocking error

This avoids the action's npm install mechanism entirely and uses the version already in node_modules.

Affected Area

CI/Workflows

Additional Context

The project uses a Bun workspace monorepo. react-doctor is a devDependency of @sonora/mobile (workspace at apps/mobile), not the root. The action runs from the repo root (directory: . default) and installs its own copy via npm, which is a different toolchain than the project's bun-based install.

doctor.config.ts lives at apps/mobile/doctor.config.ts.
Makefile target doctor-diff uses: cd apps/mobile && bunx react-doctor --verbose --diff --fail-on error

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions