
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on your error message, it looks like you're dealing with a few separate issues that don't actually require deleting your Sanity account or completely uninstalling everything. Let me break down what's happening and how to fix it:
The error Command "start" is not available outside of a Sanity project context means you're trying to run sanity start from a directory that isn't a Sanity project. The Sanity CLI commands (like sanity start or sanity dev) need to be run from inside a Sanity project folder where @sanity/core is installed as a dependency.
The errors about "Cannot delete user while being the last administrator of a project" and "A valid session is required" are appearing because you're trying to delete your account, but:
Good news: You don't need to delete your account or uninstall Sanity globally to fix this!
Based on the discussion you found, here's what actually works:
The sanity start command only works when you're inside your Sanity project folder. Use cd to navigate to your project directory first:
cd path/to/your/sanity-projectInstead of deleting your account, just create a new Sanity project using the modern approach:
npm create sanity@latestThis will guide you through creating a new project with an interactive setup. When you run this command, it will:
Then you can start your studio with:
npm run devOr if you're using the older CLI pattern:
sanity devYou can safely delete old project folders from your file system without affecting your Sanity account or other projects. These are just local files. Search for folders containing sanity.config files and delete the ones you don't need.
If you have the global CLI installed and want to ensure you're using the latest version:
npm install -g @sanity/cli@latestOr you can use npx to always run the latest version without a global install:
npx sanity@latest initThe modern way to create a Sanity project is:
npm create sanity@latestThis is cleaner than the older sanity init approach and will set everything up correctly from the start.
Your existing projects in your Sanity account will remain untouched - you're just creating new local project folders on your computer that connect to them.
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