Studio stuck loading when running npm run dev - what am I doing wrong?
Good morning! 👋
The issue is likely that you need to run npm run dev from inside your Studio directory, not from the root of your project.
When you have a Sanity project, the Studio typically lives in its own folder (often called something like studio/, my-project-studio/, or similar). The sanity dev command needs to be run from the directory that contains your Studio's package.json and sanity.config.ts files.
Here's what you should do:
Navigate to your Studio directory:
cd studio # or whatever your studio folder is calledThen run the dev command:
npm run dev
Your Studio should now start up properly and be available at http://localhost:3333 by default.
If you're working with a monorepo
If your project is set up as a monorepo (where multiple apps like your Studio and frontend live in the same repository), you might have a root package.json with scripts that can run commands in specific workspaces. In that case, check your root package.json for scripts like:
{
"scripts": {
"dev:studio": "pnpm --filter studio dev"
}
}But if you're just getting started and don't have that setup, the simple solution is to cd into your Studio directory first, then run npm run dev from there.
Hope that gets you unstuck! The sanity dev command is pretty fast once it's running from the right location with live reloading and all.
Show original thread9 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.