Skip to content

[Bug]: @shopify/cli@3.90.0 ships outdated React Router version check from @shopify/cli-hydrogen #6829

@lexabu

Description

@lexabu

Description

@shopify/cli@3.90.0 (latest) bundles an outdated version of the @shopify/cli-hydrogen React Router version check that expects 7.9.2, even though:

  1. The Hydrogen team already updated EXPECTED_VERSION to "7.12.0" on main (packages/cli/src/lib/react-router-version-check.ts)
  2. This fix was included in @shopify/cli-hydrogen@11.1.6 (via PR #3346)
  3. The skeleton template updated to React Router 7.12.0 in skeleton@2025.7.1

Current behavior

Running shopify hydrogen dev with @shopify/cli@3.90.0 displays a warning telling developers to downgrade React Router from 7.12.0 to 7.9.2:

╭─ warning ────────────────────────────────────────────────────────────╮
│                                                                      │
│  React Router version mismatch detected                              │
│                                                                      │
│  Hydrogen requires React Router 7.9.x for proper functionality.      │
│                                                                      │
│  Version mismatches found:                                           │
│    • react-router: installed 7.12.0, expected 7.9.2                  │
│    • @react-router/dev: installed 7.12.0, expected 7.9.2             │
│    • @react-router/fs-routes: installed 7.12.0, expected 7.9.2       │
│                                                                      │
│  To fix this issue, run:                                             │
│    npm install react-router@7.9.2                                    │
│    npm install -D @react-router/dev@7.9.2 @react-router/fs-routes@7.9.2 │
│                                                                      │
╰──────────────────────────────────────────────────────────────────────╯

Evidence

Confirmed by inspecting the bundled CLI code:

# @shopify/cli@3.90.0 (npm, latest)
$ grep "EXPECTED_VERSION" node_modules/@shopify/cli/dist/index.js
], EXPECTED_VERSION = "7.9.2";   # ← stale, should be "7.12.0"

# @shopify/cli@3.89.0 (Homebrew, latest)
$ grep "EXPECTED_VERSION" /opt/homebrew/Cellar/shopify-cli/3.89.0/.../dist/index.js
], EXPECTED_VERSION = "7.9.2";   # ← same stale value

Meanwhile, the Hydrogen repo main branch already has the fix:

const EXPECTED_VERSION = '7.12.0';  // ← correct

Security concern

React Router 7.9.2 has multiple known CVEs fixed in 7.12.0:

The CLI is actively advising developers to install a vulnerable version.

Expected behavior

The next @shopify/cli release should bundle @shopify/cli-hydrogen@11.1.6+ which contains the corrected version check.

Environment

  • @shopify/cli: 3.90.0 (npm) / 3.89.0 (Homebrew)
  • Node: 22.x
  • OS: macOS

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions