Sanity Studio not reflecting schema changes in post.ts file

7 replies
Last updated: Jan 28, 2026
Hi everyone,
I'm pretty new to web development, and I'm following a crash course by User where he builds a few apps using Next.JS, and the first one is a blog within Sanity.
My issue is, everything was working smoothly, until I tried to update the Post schema in the studio.
My studio is running in localhost:3333 normally, I can create posts, authors, query them using vision, however, when I modify anything in my app folder/schemas/post.ts (I'm using typescript), it does not update in the studio. I tried including a description field, but my studio does not show it. I even tried changing the title value in the title field to pt-br, no luck too.
AI Update

This is a frustrating but common issue! The good news is it's usually something simple. When your Sanity Studio isn't reflecting schema changes, here are the most common causes and solutions:

1. Hard Refresh Your Browser

The most common culprit is browser caching. Even though the dev server has Hot Module Replacement (HMR), sometimes your browser holds onto the old schema. Try:

  • Hard refresh: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
  • Clear cache: Open DevTools → Network tab → check "Disable cache" and refresh

2. Restart the Dev Server

Sometimes HMR doesn't catch schema changes properly. Stop your dev server (Ctrl+C) and restart it:

npm run dev
# or
sanity start

3. Check Your File Location

Make sure you're editing the correct schema file. In a typical Next.js + Sanity setup, there can be confusion about where schemas live:

  • Standalone Studio: Schemas are usually in /schemas/ or /schemaTypes/
  • Embedded Studio (Studio v3 in Next.js): Schemas might be in /sanity/schemas/ or /app/schemas/

Double-check that the schema file you're editing is actually being imported in your Sanity configuration file.

4. Verify Schema is Imported

Open your sanity.config.ts (or sanity.config.js) and make sure your post schema is properly imported and included in the types array. This is the central configuration file where all schemas must be registered:

import {defineConfig} from 'sanity'
import {post} from './schemas/post'
import {author} from './schemas/author'

export default defineConfig({
  // ... other config
  schema: {
    types: [post, author], // Make sure your schema is here!
  },
})

5. Check for TypeScript/JavaScript Errors

Look at your terminal where the dev server is running. If there's a syntax error in your schema file, it won't compile and the changes won't show up. The terminal will usually show compilation errors in red.

6. Port Conflicts

Since you mentioned localhost:3333, make sure nothing else is using that port. If another process is occupying it, your Studio might not be running the latest code. You can check by completely stopping the server and restarting it.

Quick Test

Try making a very obvious change to test if HMR is working at all:

{
  name: 'title',
  title: 'TESTING 123', // Make it obvious
  type: 'string'
}

If this doesn't show up after a hard refresh, it confirms the schema isn't being picked up.

Still Not Working?

If none of the above works, try this nuclear option:

  1. Stop the dev server
  2. Delete node_modules and any .sanity cache folders
  3. Run npm install again
  4. Restart the dev server

This usually resolves any stubborn caching or module resolution issues that can happen during development.

Let us know which solution worked for you, or if you're still stuck, share your sanity.config.ts file structure and we can help debug further!

Show original thread
7 replies

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.

Was this answer helpful?