Joint session with Vercel: How to build intelligent storefronts (May 15th) →

Crash error on Media and Dashboard tabs in new Sanity project

2 repliesLast updated: Nov 29, 2025

Hi everyone! hope all of you are well!getting the crash error on Media and Dashboard tab when open it. in very new created Sanity project.
is anyone help out ?
AI Update

Sorry to hear you're experiencing crashes with the Media and Dashboard tabs in your new Sanity project! This is a known issue that's typically related to React 19 compatibility with certain plugins. Here's what's likely happening and how to fix it:

The Problem

Based on the error patterns you're seeing, this is most commonly caused by:

Solutions to Try

Update Sanity Studio, the media plugin, and React to their latest compatible versions:

npm install sanity@latest sanity-plugin-media@latest react@latest react-dom@latest

According to Sanity's React 19 compatibility guidance, most official plugins now support React 19, but you need the latest versions.

2. If Using React 19, Consider Downgrading to React 18.3

If updating doesn't work, React 18.3 is currently the most stable version for Sanity:

npm install react@18.3.1 react-dom@18.3.1 --save-exact

3. Check for the "Duplicate Context" Error

If you're seeing an error about "Duplicate instances of context" with the media library, this indicates you might have multiple versions of Sanity packages installed. Run:

npm dedupe
# or if using pnpm
pnpm dedupe

4. Verify Your Package Versions

Check your package.json to ensure you have:

5. Clear Cache and Reinstall

Sometimes a clean install helps:

rm -rf node_modules package-lock.json
npm install

If You're Using the Community Media Plugin

Note that sanity-plugin-media is a community plugin (not an official Sanity plugin). If issues persist, you might want to consider:

For the Dashboard Plugin

The @sanity/dashboard plugin has had some React 19 compatibility issues. Make sure you're on the latest version, and check the Sanity changelog for updates.

Let us know which versions you're running and what specific error messages you're seeing, and we can provide more targeted help!

Show original thread
2 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions