Gatsby projects suddenly started throwing error: TypeError: Cannot convert undefined or null to object

Not sure what happened, but our pipelines and local environments all throw the same issue. Seems to be something on the Prismic side? Looking at other articles it looks like they required a new version of the gatsby-source-prismic plugin to remedy the issue.

We are using the following package versions:

   "@apollo/client": "^3.5.10",
    "@prismicio/helpers": "^2.1.0",
    "@prismicio/react": "^2.0.5",
    "apollo-cache-inmemory": "^1.6.6",
    "apollo-client": "^2.6.10",
    "apollo-link-prismic": "^1.1.1",
    "gatsby": "^4.6.0",
    "gatsby-plugin-gatsby-cloud": "^4.6.0",
    "gatsby-plugin-image": "^2.6.0",
    "gatsby-plugin-manifest": "^4.6.0",
    "gatsby-plugin-offline": "^5.6.0",
    "gatsby-plugin-prismic-previews": "^5.2.5",
    "gatsby-plugin-react-helmet": "^5.6.0",
    "gatsby-plugin-sass": "^5.6.0",
    "gatsby-plugin-sharp": "^4.6.0",
    "gatsby-source-filesystem": "^4.6.0",
    "gatsby-source-prismic": "^5.2.5",
    "gatsby-transformer-sharp": "^4.6.0",

Ope, we got it. This error was triggered by having an empty slice zone in one of our content types. Would it be possible to add checks in so that this does not happen?

Custom Type:

Slice zone on the page:

1 Like