Issues with types in sanity/structure (desk) after recent changes
I understand you're experiencing TypeScript type issues with sanity/structure imports after recent changes. While I can confirm that the Desk Tool was officially renamed to Structure Tool (and imports changed from sanity/desk to sanity/structure), I don't have verified information about specific ongoing type issues with the current implementation.
What Changed
The Structure Tool documentation confirms the official migration:
Old (Desk Tool):
import { deskTool } from 'sanity/desk'New (Structure Tool):
import { structureTool } from 'sanity/structure'If You're Experiencing Type Issues
Without being able to verify the specific issue you're encountering, here are some general troubleshooting steps:
Ensure you're using the correct import path: Make sure you've updated all imports to use
'sanity/structure'instead of'sanity/desk'Check your Sanity version: Run
npm list sanityto confirm your installed version. Type definitions should be included with the package.Clear TypeScript cache: Sometimes TypeScript's language server needs a restart. In VS Code, use "TypeScript: Restart TS Server" from the command palette.
Verify your tsconfig.json: Ensure your TypeScript configuration properly resolves node_modules types.
Check for conflicting files: If you have a custom structure configuration file, ensure it's not creating naming conflicts with the module import.
Getting Help
Since I cannot verify the specific issue you're facing, I'd recommend:
- Check the Sanity GitHub repository for open issues related to
sanity/structuretypes - Share your specific error message in the Sanity Community Slack - the community and Sanity team can provide more targeted help with the actual error
- Include details like your Sanity version, TypeScript version, and the exact error message you're seeing
If there's a known issue with a timeline for resolution, the Sanity team typically communicates this through GitHub issues or community channels. I apologize I couldn't provide more specific information about the particular issue you're experiencing.
Show original thread11 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.