title: "Gatsby-plugin-sharp wasn't setup correctly in gatsby-config.js. Make sure you add it to the plugins array."
body: <p>The most frustrating part is that I had this working earlier then somehow broke it, but I'm using gatsby-plugin-sharp and gatsby-plugin-image to add a photo to my homepage and seeing this error:</p>
  <p><code>Gatsby-plugin-sharp wasn't setup correctly in gatsby-config.js. Make sure you add it to the plugins array.</code></p>
  <p>I have no idea why... I've tried deleting node_modules, package_lock.json, reinstalling... beyond that I can also tell that the plugin is certainly in my array, and if I add options to the plugin-sharp that are unresolved, it asks me about them when the plugin loads.</p>
  <p>I'm not sure if I need to order them in a different way and am kicking myself for not backing up.</p>
  <p>gatsby-config.js:</p>
  <pre><code>module.exports = {
    siteMetadata: {
      siteUrl: 'myinfo-redacted',
      name: &quot;myinfo-redacted&quot;,
      defaultTitle: &quot;Bmyinfo-redacted&quot;,
      titleTemplate: &quot;%s • myinfo-redacted&quot;,
      description: &quot;myinfo-redacted&quot;,
      author: &quot;myinfo-redacted&quot;,
      hero: {
        heading: &quot;myinfo-redacted&quot;,
        subHeading: &quot;myinfo-redacted&quot;,
      },
      social: [
        {
          name: &quot;twitter&quot;,
          url: &quot;myinfo-redacted&quot;,
        },
        {
          name: &quot;linkedin&quot;,
          url: &quot;myinfo-redacted&quot;,
        },
        {
          name: &quot;devto&quot;,
          url: &quot;myinfo-redacted&quot;,
        },
        {
          name: &quot;youtube&quot;,
          url: &quot;myinfo-redacted&quot;,
        },
      ],
    },
    plugins: [
      `gatsby-plugin-image`,
      `gatsby-plugin-sharp`,
      `gatsby-transformer-sharp`,
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `images`,
          path: `${__dirname}/src/gatsby-theme-purist/images`
        },
      },
      {
        resolve: 'gatsby-theme-purist',
        options: {
          contentBase: 'content',
          basePath: '/',
          featuredArticleLimit: 2,
        },
      },
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: `Bryan Barrows`,
          short_name: `Bryan Barrows`,
          start_url: `/`,
          icon: 'static/favicon.png'
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `markdown-pages`,
          path: `${__dirname}/content/articles`,
          ignore: [`**/drafts`]
        },
      },
      {
        resolve: `gatsby-plugin-feed`,
        options: {
          query: `
            {
              site {
                siteMetadata {
                  title
                  description
                  siteUrl
                  site_url: siteUrl
                }
              }
            }
          `,
          feeds: [
            {
              serialize: ({ query: { site, allMdx } }) =&gt; {
                return allMdx.edges.map(edge =&gt; {
                  return Object.assign({}, edge.node.frontmatter, {
                    description: edge.node.frontmatter.description,
                    date: edge.node.frontmatter.date,
                    author: site.siteMetadata.name,
                    url: site.siteMetadata.siteUrl + edge.node.fields.slug,
                    guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
                    custom_elements: [{ &quot;content:encoded&quot;: edge.node.html }]
                  });
                });
              },
              query: `
                {
                  allMdx(
                    sort: { order: DESC, fields: [frontmatter___date] }, filter: {frontmatter: { draft: {eq: false} }}
                  ) {
                    edges {
                      node {
                        excerpt
                        html
                        fields { slug }
                        frontmatter {
                          title
                          date
                          description
                          author
                        }
                      }
                    }
                  }
                }
              `,
              output: &quot;/rss.xml&quot;,
              title: &quot;Bryan Barrows RSS Feed&quot;,
              // optional configuration to insert feed reference in pages:
              // if `string` is used, it will be used to create RegExp and then test if pathname of
              // current page satisfied this regular expression;
              // if not provided or `undefined`, all pages will have feed reference inserted
              match: &quot;^/articles/&quot;
            }
          ]
        }
      },
      {
        resolve: &quot;gatsby-plugin-social9-socialshare&quot;,
        options: {
          content:  &quot;ca24ce819d944595a0a4c3f53125d1a8&quot;,
          async: true,
          defer: true
        }
      },
      {
        resolve: 'gatsby-plugin-offline',
        options: {}
      },
    ],
  }
  </code></pre>
  <p>package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;gatsby-starter-purist&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;repository&quot;: &quot;&quot;,
    &quot;author&quot;: &quot;Sebastian Ojeda &lt;hello@sebastianojeda.com&gt; (@sebsojeda)&quot;,
    &quot;license&quot;: &quot;0BSD&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;yarn dev&quot;,
      &quot;dev&quot;: &quot;GATSBY_GRAPHQL_IDE=playground gatsby develop&quot;,
      &quot;build&quot;: &quot;gatsby build&quot;,
      &quot;clean&quot;: &quot;gatsby clean&quot;
    },
    &quot;dependencies&quot;: {
      &quot;gatsby&quot;: &quot;^4.0.0-next&quot;,
      &quot;gatsby-image&quot;: &quot;^3.11.0&quot;,
      &quot;gatsby-plugin-feed&quot;: &quot;^4.4.0&quot;,
      &quot;gatsby-plugin-image&quot;: &quot;^2.4.0&quot;,
      &quot;gatsby-plugin-manifest&quot;: &quot;^4.3.0&quot;,
      &quot;gatsby-plugin-mdx&quot;: &quot;^3.4.0&quot;,
      &quot;gatsby-plugin-offline&quot;: &quot;^5.3.0&quot;,
      &quot;gatsby-plugin-sharp&quot;: &quot;^3.8.0&quot;,
      &quot;gatsby-plugin-social9-socialshare&quot;: &quot;^1.0.5&quot;,
      &quot;gatsby-remark-images&quot;: &quot;^6.4.0&quot;,
      &quot;gatsby-source-filesystem&quot;: &quot;^4.4.0&quot;,
      &quot;gatsby-theme-purist&quot;: &quot;^1.3.0&quot;,
      &quot;gatsby-transformer-remark&quot;: &quot;^5.3.0&quot;,
      &quot;gatsby-transformer-sharp&quot;: &quot;^4.4.0&quot;,
      &quot;markdown-to-jsx&quot;: &quot;^7.1.5&quot;,
      &quot;react&quot;: &quot;^16.14.0&quot;,
      &quot;react-dom&quot;: &quot;^16.14.0&quot;
    }
  }
  </code></pre>
  <p>The fact that it was working as intended earlier today leads me to believe that it should be possible and that something got funky with the gatsby-config.js - particularly becuase of the error about misconfiguration or it missing from plugin array.</p>