Sanity
Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

TypeError: Cannot Read Properties of Null (Reading 'jsonType')

4 replies
Last updated: Sep 28, 2022

Hey guys! I wrote out my schemas but im still having this error appear

TypeError: Cannot read properties of null (reading 'jsonType')
    at validateNonObjectFieldsProp (/static/js/app.bundle.js:185357:16)
    at _default (/static/js/app.bundle.js:185325:155)
    at visitors.reduce._objectSpread._problems (/static/js/app.bundle.js:183832:17)
    at Array.reduce ()
    at /static/js/app.bundle.js:183831:21
    at /static/js/app.bundle.js:183850:70
    at /static/js/app.bundle.js:183966:12
    at /static/js/app.bundle.js:183981:95
    at Array.forEach ()
    at traverseSchema (/static/js/app.bundle.js:183980:9)
any suggestions?

Sep 28, 2022, 5:20 PM

This usually happens if you leave a

type
property off of a schema!

Sep 28, 2022, 5:24 PM

It seems to be a different cause, all my schemas have types and I'm searching for spelling errors, anything else you could possibly think off?

Sep 28, 2022, 5:34 PM

fount the error for type, document was just spelt as docunent, everything is working fine now thank you!

Sep 28, 2022, 5:38 PM

Fantastic!

Sep 28, 2022, 5:40 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.