> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading Medusa

> Move a Mercur project from Medusa 2.22 to Medusa 2.23.

Mercur and Medusa are upgraded together. `@mercurjs/core` declares Medusa as a peer dependency, so bumping Mercur alone keeps your project on the Medusa version it already pins.

## Supported versions

| Mercur package | Medusa | React |
| - | - | - |
| `@mercurjs/core` | `>=2.22.3 <2.24.0` | n/a |
| `@mercurjs/admin`, `@mercurjs/vendor`, `@mercurjs/dashboard-shared` | `2.23.x` (Medusa UI `4.3`) | `19` |

The backend accepts both 2.22 and 2.23, so you can upgrade Mercur first and Medusa later. The panels are built on Medusa UI 4.3, which requires React 19.

> [!WARNING]
>
> `@mercurjs/core` checks the installed `@medusajs/core-flows` version at boot. Releases before this one only accept Medusa below 2.23 and throw on startup if you bump Medusa without bumping Mercur.

## What changed in Medusa 2.23

* **React 19.** Medusa UI 4.3 and `@medusajs/dashboard` require React 19.
* **Express 5.** Medusa's HTTP layer moved to Express 5. Custom API routes and middlewares that rely on Express 4 behaviour, such as assigning to `req.query`, need a review.
* **Tailwind CSS 4.** Medusa UI is styled for Tailwind 4. The Mercur panels ship their compiled CSS, so host apps that import `@mercurjs/admin/index.css` or `@mercurjs/vendor/index.css` need no Tailwind changes.

## Upgrade steps

**1. Bump Mercur and Medusa together**

In every `package.json` of the project, including the root `overrides` and `resolutions`, move all `@mercurjs/*` packages to the new release and every `@medusajs/*` package to the same Medusa version:

```json theme={null}
{
  "@medusajs/framework": "2.23.2",
  "@medusajs/medusa": "2.23.2",
  "@medusajs/cli": "2.23.2",
  "@medusajs/ui": "4.3.2"
}
```

Keep every `@medusajs/*` package on exactly the same version.

**2. Move the admin and vendor apps to React 19**

```json theme={null}
{
  "react": "^19.3.1",
  "react-dom": "^19.3.1",
  "@types/react": "^19.3.3",
  "@types/react-dom": "^19.3.0"
}
```

Check your own pages and widgets for React 19 type changes, for example `useRef()` now requires an initial value.

**3. Reinstall from scratch**

Delete `node_modules` and the lockfile before installing. A partial install can keep a second copy of `@medusajs/types` built against Express 4, which surfaces as `query` or `link` resolving to `unknown` in TypeScript.

```bash theme={null}
rm -rf node_modules packages/*/node_modules apps/*/node_modules bun.lock
bun install
```

**4. Migrate and rebuild**

```bash theme={null}
cd packages/api
bunx medusa db:migrate
cd ../..
bun run build
```

## Mercur Enterprise

Mercur Enterprise publishes its own compatibility. Stay on Medusa 2.22 and React 18 until an Enterprise release lists support for this Mercur version.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.