No document types showing in Sanity Studio at /admin route
Welcome to Sanity! The "no document types" message is a common issue when getting started, and it's usually a quick fix.
The most common cause is that your schema types aren't properly configured in your sanity.config.js (or sanity.config.ts) file. When you use defineConfig, you need to make sure you're passing your schema types correctly.
Here's what your config should look like:
import { defineConfig } from 'sanity'
import { structureTool } from 'sanity/structure'
export default defineConfig({
name: 'my-studio',
title: 'My Studio',
projectId: 'your-project-id',
dataset: 'production',
plugins: [
structureTool() // This is required to see the structure tool interface
],
schema: {
types: [/* your schema types go here */]
}
})Common mistakes to check:
Missing the
schemaproperty entirely - Make sure you have aschema: { types: [...] }object in your configEmpty types array - If you haven't created any schema files yet, the types array will be empty. You need at least one document type defined
Not importing your schema types - If you've created schema files (like
post.js,author.js, etc.), you need to import them and add them to the types array:
import post from './schemas/post'
import author from './schemas/author'
export default defineConfig({
// ...
schema: {
types: [post, author]
}
})- Missing the structureTool plugin - Without structureTool() in your plugins array, you won't see the content management interface. Note: if you're following an older tutorial, it might reference
deskTool()- this has been renamed tostructureTool()and the import is nowimport { structureTool } from 'sanity/structure'
Quick troubleshooting steps:
- Check if you have any schema files created (usually in a
schemasfolder) - Make sure those schema files are being imported into your config
- Verify the types array includes your imported schemas
- Restart your dev server after making config changes
- If the tutorial uses
deskTool, replace it withstructureTooland update the import path
If you're still stuck, feel free to share your sanity.config.js file and your schema folder structure - the community is always happy to help debug! Since you're at 37:18 in the tutorial, double-check that you've completed the schema creation steps that should come before that timestamp. Also note that if the tutorial is a bit older, some of the plugin names may have changed, so don't worry - the concepts are the same, just the naming has been updated.
Show original thread7 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.