
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI can see you're running into a common issue when setting up custom desk structure! The article you're following is likely for an older version of Sanity Studio. There have been some important changes in recent versions that are causing your error.
In Sanity Studio v3+, the Structure Builder setup has changed from earlier versions. The most common issues are:
'sanity/desk' import is now 'sanity/structure'deskTool() is now structureTool()Here's how to set it up correctly for modern Sanity Studio:
In your sanity.config.ts:
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
export default defineConfig({
// ... your other config
plugins: [
structureTool({
structure: (S) =>
S.list()
.title('Content')
.items([
S.documentTypeListItem('post').title('Posts'),
S.documentTypeListItem('author').title('Authors'),
// ... more items
])
}),
// ... other plugins
],
})Or extract it to a separate file (structure/index.ts):
import type {StructureResolver} from 'sanity/structure'
export const structure: StructureResolver = (S) =>
S.list()
.title('Content')
.items([
S.documentTypeListItem('post').title('Posts'),
S.documentTypeListItem('author').title('Authors'),
])Then import it:
import {structureTool} from 'sanity/structure'
import {structure} from './structure'
export default defineConfig({
plugins: [
structureTool({structure}),
],
})'sanity/structure' (not 'sanity/desk')structureTool() (not deskTool())(S) => S.list()... or (S, context) => S.list()...The Structure Builder documentation has been updated with all the current syntax, so that's your best reference going forward!
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store