Error: You must login first - run "sanity login" at Object.apiClient

4 replies
Last updated: Sep 20, 2020

i tried sanity react and it worked perfectly well but i had to reset my macbook. I reinstalled and got the code repo from github, yarn start worked well, but doing sanity start gives this error
Error: You must login first - run "sanity login"
at Object.apiClient (/usr/local/lib/node_modules/@sanity/cli/bin/sanity-cli.js
:1974:584) at ~/Projects/sanity/sanity-react/mysanityblog/node_modules/@sanity/core/lib/actions/start/startAction.js
:160:41 at (<anonymous>)
at asyncGeneratorStep (~/Projects/sanity/sanity-react/mysanityblog/node_modules/@sanity/core/lib/actions/start/startAction.js
:42:103) at _next (~/Projects/sanity/sanity-react/mysanityblog/node_modules/@sanity/core/lib/actions/start/startAction.js

Sep 20, 2020, 4:38 PM

Do sanity login first

Sep 20, 2020, 4:54 PM

you mean logging into sanity only. I did logged into sanity but that didn't help.

Sep 20, 2020, 5:45 PM

Run sanity login into your terminal

Sep 20, 2020, 5:48 PM

That worked Thanks.

Sep 20, 2020, 5:51 PM Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Free to get started, pay-as-you-go on all plans.