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/requirefrom 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 throughrequire, Studio reports a different problem instead — see Schema type is ES Module but imported through require. - Something is returning
undefined,nullorfalseinstead 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?
Feedback submitted, thanks for helping us improve the docs. Have you tried these alternatives?