CLI errors
You may run into errors while using the CLI. Listed below are some explanations and common solutions for these errors.
Gotcha
Some error explanations may be missing. If you cannot find the error you are looking for, please use the feedback form to let us know.
This error occurs when you run a command without the appropriate permissions. Common causes can be:
- Incorrect or misspelled project ID in your
sanity.json
. - You don't have the rights to deploy a project. Need to be an Administrator or have a deploy token to do this.
For example: runningsanity graphql deploy
with Write or Read+Write access only will give you this error.
This error occurs on sanity deploy
when you have access to the studio but without the required permissions to deploy.
This can be one of several issues:
- A temporary issue, please try to run your command again.
- You have specified an invalid token with the
SANITY_AUTH_TOKEN
env variable. - The session timed out. Try to log out and log in again with the
sanity logout
andsanity login
CLI commands. - There was an issue with your logged in user. Try to logout and login again.