
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeWhen Sanity Studio gets stuck on "Loading documents…" for a long time locally, this is usually a configuration issue. Here are the most common causes and solutions:
First, make sure your sanity.config.js (or sanity.config.ts) has the correct projectId and dataset configured. Using defineConfig, your config should look something like this:
import { defineConfig } from 'sanity'
import { structureTool } from 'sanity/structure'
export default defineConfig({
name: 'default',
title: 'My Studio',
projectId: 'your-project-id', // Make sure this is correct
dataset: 'production', // Make sure this matches your dataset
plugins: [
structureTool()
],
schema: {
types: [/* your schema types */]
}
})If you're using environment variables, note that Sanity Studio v3+ requires the SANITY_STUDIO_ prefix for environment variables to be accessible in the browser. Your .env file should look like:
SANITY_STUDIO_PROJECT_ID=your-project-id SANITY_STUDIO_DATASET=production
Then reference them in your config:
export default defineConfig({
projectId: process.env.SANITY_STUDIO_PROJECT_ID,
dataset: process.env.SANITY_STUDIO_DATASET,
// ... rest of config
})sanity login in your terminal to ensure you're authenticatednpm install (or yarn install) fresh can resolve dependency sync issuesprojectId and dataset are correct in your configsanity login to refresh authenticationnpm install or yarn install to ensure dependencies are in syncIf you're still stuck after trying these solutions, check the browser console for specific error messages - they'll usually point you to the exact configuration issue.
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