Hey! When after creating a new project `sanity init` (with empty schema), I get this error when I run `sanity start` : ```Warning in ./node_modules/@sanity/ui/dist/es/atoms/icon/icon.js 16:9...
This error is happening because you're accidentally running Sanity Studio v2 instead of v3. The warning about @sanity/icons default export and references to @sanity/base with the parts system (part:@sanity/base/sanity-root) are telltale signs of the older v2 architecture.
Here's what's likely happening: even though you ran sanity init, your project somehow got initialized with v2 dependencies instead of v3. This can happen if you have an older version of the Sanity CLI installed globally.
To fix this:
- Update the Sanity CLI globally:
npm install -g @sanity/cli@latest- Delete your current project and create a fresh one:
# Remove the project directory
rm -rf your-project-folder
# Create a new project with the updated CLI
sanity init- Alternatively, if you want to keep the project, manually upgrade to v3:
- Delete
node_modulesandpackage-lock.json(oryarn.lock) - Update your
package.jsonto use Sanity Studio v3 dependencies (should besanity@^3.xinstead of@sanity/coreand other v2 packages) - Run
npm installagain
- Delete
How to verify you're on v3:
- Your
package.jsonshould have"sanity": "^3.x"as a dependency - You should not see
@sanity/base,@sanity/core, or@sanity/desk-toolin your dependencies (these are v2 packages) - Your config file should be
sanity.config.tsorsanity.config.js, notsanity.json
The issue you're seeing is that @sanity/icons removed its default export in newer versions, but v2's @sanity/ui still tries to import it the old way, causing this compatibility mismatch. Studio v3 uses the modern import structure and doesn't have this problem.
If you continue having issues after updating the CLI and reinitializing, check that you don't have any old Sanity packages cached or lingering in your global npm/yarn cache.
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.