
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI can see what's happening here! This is a common confusion when setting up Sanity + Next.js on Vercel. The error you're seeing is related to Vercel's project configuration, not your actual project structure.
The issue is that Vercel is looking for a dist folder because it's been configured (or auto-detected) with the wrong build settings. When you deploy a Next.js application to Vercel, you should NOT be running sanity build as part of your deployment - that command is only for building a standalone Sanity Studio for self-hosting.
Go to your Vercel project settings (Project Settings → General → Build & Development Settings)
Set the correct Framework Preset: Select "Next.js" from the dropdown. This will automatically configure:
next build (not sanity build).next (not dist)If you've manually set an Output Directory, remove it or change it to .next
sanity build generates a dist folder containing a standalone Sanity Studionext build generates a .next folder containing your Next.js application.gitignore entries for both because it may contain both a Next.js app AND an embedded Studio, but only the Next.js build is deployed to Vercel/studio route), you only run next build - Next.js handles bundling the Studio as part of your applicationIf your project structure looks like this:
/app or /pages (Next.js routes) /sanity (Sanity schema/config) next.config.js sanity.config.ts
Then you're building a Next.js app with embedded Studio, and you should use Next.js build settings on Vercel, not standalone Studio settings.
After updating these settings in Vercel, trigger a new deployment and it should build successfully!
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