env.prismicClient.getAll is not a function

After adding a "blog page" custom type, I'm getting this error.

image

I can't find any information about env.prismicClient.getAll
The site worked fine prior to adding the "blog page" custom type

Hey @loden16harris, thanks for reaching out!

Can you share with us your plugin configuration?
Which version of the plugin is installed in your project?

const linkResolver = require('./src/utils/linkResolver')

module.exports = {
  siteMetadata: {
    siteUrl: "https://www.yourdomain.tld",
    title: "Multiplied By One",
  },
  plugins: [
    "gatsby-plugin-react-helmet",
    "gatsby-plugin-sitemap",
    "gatsby-plugin-image",
    {
      resolve: "gatsby-source-prismic",
      options: {
        repositoryName: process.env.PRISMIC_REPO_NAME,
        accessToken: process.env.PRISMIC_ACCESS_TOKEN,
        customTypesApiToken: process.env.PRISMIC_CUSTOM_TYPES_API_TOKEN,
        linkResolver: (doc) => linkResolver(doc),
      },
    },
  ],
};

image

Could you try and update to 5.2.2 and see if that helps?

That seemed to work!

I uninstalled and reinstalled the gatsby-source-prismic plugin. Now the error went away and my custom types are in Graphql.

Thanks!

1 Like

I'm glad to know that.

Please inform us if we can help you with anything else!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.