Help articles

Schema type is invalid

Sanity Studio reports Invalid/undefined type declaration, check declaration or the import/export of the schema type. when an entry in your schema's types array is not a valid schema type declaration. Common causes:

  • The type declaration is imported through import/require from a different file, but the import declaration either references an incorrect name or the imported file has no export declaration. If you imported an ES module through require, Studio reports a different problem instead — see Schema type is ES Module but imported through require.
  • Something is returning undefined, null or false instead of the schema type declaration.

Double-check the types array of your schema declaration at the specified index to figure out where the error stems from.

Was this page helpful?