Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

I get this error when trying to run a Sanity Studio ```Uncaught TypeError: Cannot read property 'sanity' of undefined```

11 replies
Last updated: Jan 12, 2021
I get this error when trying to run a Sanity Studio
Uncaught TypeError: Cannot read property 'sanity' of undefined
Jan 12, 2021, 11:30 PM
Did you run
npm install -g @sanity/cli
Jan 12, 2021, 11:31 PM
yes
Jan 12, 2021, 11:31 PM
i have other studios that work
Jan 12, 2021, 11:31 PM
Does the fix suggested at the end here work?
https://github.com/sanity-io/sanity/issues/2190
Jan 12, 2021, 11:33 PM
Trying to hook this repo up and Ive done it before but now Im getting this error. I was hoping someone had insight.
Jan 12, 2021, 11:33 PM
i tried that fix, deleting node_modules?
Jan 12, 2021, 11:33 PM
ah, package-lock.json Ill try it now
Jan 12, 2021, 11:34 PM
deleting package-lock.json. Otherwise it might be worth running
sanity upgrade
Jan 12, 2021, 11:34 PM
that worked thank you
Jan 12, 2021, 11:37 PM
i totally glossed over the package-lock part
Jan 12, 2021, 11:37 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?