Getting Consistent Errors on First Day Using Sanity - Demo Also Failing
I'd be happy to help you troubleshoot this! Since you mentioned you've attached a photo but I can't see it in this format, I'll cover the most common issues people encounter when first starting with Sanity.
First, check the Sanity Status Page to make sure there aren't any ongoing service issues today. This is always a good first step when experiencing problems.
Most Common Issue: CORS Configuration
The most frequent problem new users encounter is related to CORS (Cross-Origin Resource Sharing) origins not being configured. This typically shows up as errors like:
- "No 'Access-Control-Allow-Origin' header is present"
- "Blocked by CORS policy"
- "Access-Control-Allow-Credentials must be 'true'"
Here's how to fix it:
- Go to manage.sanity.io
- Select your project
- Navigate to Settings β API β CORS Origins
- Add your domain (for local development, add
http://localhost:3000or whatever port you're using) - Important: Check the "Allow credentials" box if you're using authentication tokens
Make sure to include the full URL with protocol (http:// or https://) - they need to match exactly. Even the difference between http:// and https:// matters!
Other Common First-Time Issues:
- Authentication: Make sure you're logged in by running
sanity loginin your terminal - Node.js version: Sanity Studio v4 requires Node.js 20 or higher
- Missing dependencies: Try running
npm installoryarn installagain - Project configuration: Verify your
sanity.config.tsorsanity.jsonhas the correct project ID and dataset name
If you can describe the specific error message you're seeing (or paste the text from the error), I can give you more targeted help! Common error messages usually point directly to the solution.
For the demos on the website, if those are also failing, it's most likely a CORS issue with your browser, a network/firewall restriction, or potentially a service issue (hence checking the status page first).
Welcome to Sanity - once you get past this initial hurdle, you'll find it's a really powerful platform! π
Show original thread4 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.