
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI'm sorry you're running into this error on a fresh install! That's definitely frustrating when you haven't even written any code yet.
Since this is happening on a completely fresh installation, here are the most common causes and solutions to try:
1. Check your Node.js version
Sanity Studio v4 requires Node.js version 20 or higher. If you're on an older version, this could cause unexpected errors. Check your version with:
node -vIf you're below Node 20, upgrade to the latest LTS version and try again.
2. Clear your dependency cache and reinstall
Sometimes package installations can get corrupted or have conflicts. Try a clean reinstall:
# Delete node_modules and lock file
rm -rf node_modules
rm package-lock.json # or yarn.lock or pnpm-lock.yaml
# Clear npm cache
npm cache clean --force
# Reinstall dependencies
npm install3. Check for environment-specific issues
The toLowerCase() error often happens when code is trying to access browser APIs (like navigator) in an environment where they don't exist. This can happen if:
4. Try creating a new project
If the above doesn't work, try creating a completely fresh project in a new directory to rule out any local environment issues:
npm create sanity@latestFollow the prompts for a new project and see if the error persists.
5. Check what version you actually installed
Make sure you're getting the latest stable version by checking your package.json. The sanity package should be at version 3.x or 4.x (depending on when you're reading this).
If none of these solutions work, it would be helpful to share more details like:
You might also want to check the Sanity GitHub issues to see if others have reported this specific error recently, or reach out in the Sanity Slack community where the team and community can help troubleshoot in real-time.
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