0
TypeError: Cannot read properties of null (reading 'jsonType')
    at validateNonObjectFieldsProp (/static/js/app.bundle.js:169457:16)
    at _default (/static/js/app.bundle.js:169425:155)
    at visitors.reduce._objectSpread._problems (/static/js/app.bundle.js:167933:17)
    at Array.reduce ()
    at /static/js/app.bundle.js:167932:21
    at /static/js/app.bundle.js:167951:70
    at /static/js/app.bundle.js:168067:12
    at /static/js/app.bundle.js:168082:95
    at Array.forEach ()
    at traverseSchema (/static/js/app.bundle.js:168081:9)

Showing the given error while performing the sanity start command, but it not showing on command line. While visiting the localhost website there's the error is showing this. I have tried downgrading the versions for sanity but still not solved this issue.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

1

You missed type document in schema

Eg:
export default {
  name: "user",
  title: "User",
  type: "document",
  fields: [
    {
      name: "userName",
      title: "UserName",
      type: "string",
    },
    {
      name: "image",
      title: "Image",
      type: "string",
    },
  ],
};
Sanjaya Paudel
  • 121
  • 1
  • 7