Upgrading Sanity and encountering an issue with the .apiversion in the schema.
The "Structure: Node ID required" error you're seeing after upgrading Sanity is related to the Structure Builder (formerly Desk Tool). This happens because all nodes within your desk structure need an ID assigned to them.
What's happening
Normally, IDs are assigned automatically based on the title of items in your structure. However, some items require a manually assigned ID. This is especially common with document list items, where the ID refers to a specific document ID.
How to fix it
You need to explicitly set an ID by calling the .id() method in your structure configuration. Here's an example:
S.documentListItem()
.id('website-featured-articles') // Add this line
.schemaType('article-set')
.title('Site config')Where to look
Check your structure configuration file (typically structure/index.ts or similar in your Sanity config). Look for any S.documentListItem(), S.listItem(), or similar structure builder methods that might be missing the .id() call.
If you recently upgraded from Studio v2 to v3 (or v3 to v4), this is a common issue because structure requirements became more strict. The official help article on this error has more details.
Quick tip
If you're not sure which item is causing the issue, check your browser console or terminal - it should give you more context about where in your structure the error is occurring. The error message typically points to the specific structure node that needs an ID.
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.