How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

Schema mismatch between local development and production deployment

22 repliesLast updated: Nov 29, 2025

I'm not sure why, but I'm seeing an old schema on a production deploys even though I see the right schema on
sanity start
for local development... never encountered this issue before. Not sure where to start with debugging? Any help is appreciated. Thanks. 😅
AI Update

This is almost certainly a browser caching issue with your deployed Studio! The good news is it's a common problem with a straightforward fix. Here's what's happening and how to resolve it:

The Problem: Service Worker & Browser Cache

When you deploy your Studio with sanity deploy, it creates a production build that gets cached aggressively by browsers and service workers. Even though you've deployed a new schema, your browser is still serving the old cached version of the Studio.

Quick Fixes (Try These First)

The Permanent Solution

If hard refreshing doesn't work or the issue keeps coming back, you may need to clear the service worker:

You can also check Cache Storage in the same Application tab and manually clear it.

Why Local Works But Production Doesn't

When you run sanity start locally, you're running a development server that doesn't use aggressive caching or service workers. That's why you see the correct schema locally but not in production—it's purely a client-side caching issue, not a deployment problem.

Verify Your Deployment

To confirm your schema actually deployed correctly, you can:

The schema deployment happens automatically when you run sanity deploy, so if that command succeeded, your schema is definitely updated on the server—it's just your browser holding onto the old version.

Let us know if the hard refresh fixes it! 😊

Show original thread
22 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