This is an unofficial compatibility fork of the official Medusa Next.js storefront, adapted to run fully on React 18.
This repository is a React 18–safe version of the official
medusajs/nextjs-starter-medusa.
The upstream starter currently depends on React 19 RC features (useActionState)
and Algolia InstantSearch, which break builds for users who must stay on stable React 18.
This fork provides:
- Stable React 18.2 + ReactDOM 18.2
- Removal of React 19
useActionState - Migration to
useState+useTransition - Removal of Algolia +
react-instantsearch-hooks-web - Clean TypeScript toolchain
- Verified working build (
yarn build) and server boot (yarn start)
Useful for:
- Production storefronts requiring React 18 stability
- Teams migrating incrementally toward React 19
- Anyone blocked by RC-only hooks or Algolia peer dependencies
The Medusa Next.js Starter is built with:
Features include:
- Full ecommerce support:
- Product Detail Page
- Product Overview Page
- Product Collections
- Cart
- Checkout with Stripe
- User Accounts
- Order Details
- Full Next.js 15 support:
- App Router
- Next fetching/caching
- Server Components
- Server Actions
- Streaming
- Static Pre-Rendering
Navigate into your projects directory and get your environment variables ready:
cd nextjs-starter-medusa/
mv .env.template .env.localUse Yarn to install all dependencies.
yarnYou are now ready to start up your project.
yarn devYour site is now running at http://localhost:8000!
By default this starter supports the following payment integrations
To enable the integrations you need to add the following to your .env.local file:
NEXT_PUBLIC_STRIPE_KEY=<your-stripe-public-key>You'll also need to setup the integrations in your Medusa server. See the Medusa documentation for more information on how to configure Stripe.