gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.21k stars 10.33k forks source link

Getting stuck on createPages when building. Gatsby+Contentful #22419

Closed anneramey closed 4 years ago

anneramey commented 4 years ago

Summary

About 60% of the time, when I locally do a gatsby build or gatsby develop, the build gets hung on createPages

Relevant information

This happens with complete inconsistency. It will happen many times in a row or not for days. Clearing the cache and public folders doesn't seem to help. This is for my contentful site. Not sure what I'm doing wrong. I'm on windows 10. My mac coworker doesn't have the issue. This has been happening through several versions of the gatsby-cli

success open and validate gatsby-configs - 0.086s success load plugins - 4.133s success onPreInit - 0.020s success delete html and css files from previous builds - 0.021s success initialize cache - 0.208s success copy gatsby files - 0.192s success onPreBootstrap - 2.194s success createSchemaCustomization - 0.058s Starting to fetch data from Contentful Fetching default locale default locale is : en-US contentTypes fetched 17 Updated entries 1284 Deleted entries 0 Updated assets 1008 Deleted assets 0 Fetch Contentful data: 10515.927ms success source and transform nodes - 13.332s success building schema - 1.379s warn code block or inline code language not specified in markdown. applying generic code block β ΄ createPages

Environment (if relevant)

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    gatsby: ^2.0.65 => 2.19.41
    gatsby-cli: ^2.6.5 => 2.10.9
    gatsby-image: ^2.0.23 => 2.2.43
    gatsby-plugin-algolia: ^0.3.0 => 0.3.4
    gatsby-plugin-google-analytics: ^2.0.8 => 2.1.37
    gatsby-plugin-manifest: ^2.0.9 => 2.2.47
    gatsby-plugin-offline: ^2.0.19 => 2.2.10
    gatsby-plugin-prefetch-google-fonts: ^1.4.2 => 1.4.3
    gatsby-plugin-react-helmet: ^3.0.2 => 3.1.23
    gatsby-plugin-sass: ^2.0.7 => 2.1.30
    gatsby-plugin-sharp: ^2.0.15 => 2.4.12
    gatsby-plugin-sitemap: ^2.0.4 => 2.2.29
    gatsby-remark-autolink-headers: ^2.0.12 => 2.1.25
    gatsby-remark-images-contentful: ^2.0.5 => 2.1.33
    gatsby-remark-prismjs: ^3.2.0 => 3.3.34
    gatsby-source-contentful: ^2.0.20 => 2.1.96
    gatsby-source-filesystem: ^2.0.12 => 2.1.54
    gatsby-transformer-remark: ^2.1.15 => 2.6.58
    gatsby-transformer-sharp: ^2.1.8 => 2.3.18

File contents (if changed)

gatsby-config.js:

require('dotenv').config()

module.exports = {
  siteMetadata: {
    title: 'Kinetic Community',
    author: 'Kinetic Data',
    description:
      'Documentation, Guides, Integrations and all you need to get started with Kinetic',
    siteUrl: 'https://community.kineticdata.com',
    twitter: 'KineticData',
    supportForm: {
      target:
        'https://kinetic-data.kinops.io/app/api/v1/kapps/www-forms/forms/community-support-request/submissions?completed=true',
    },
    navigation: [
      {
        name: 'Solutions',
        target: '/solutions',
        icon: 'cubes',
        description: 'Solutions built on the Kinetic Platform',
      },
      {
        name: 'Platform',
        target: '/platform',
        icon: 'tools',
        description: 'Build custom apps fast on our low-code platform',
      },
      {
        name: 'Integrations',
        target: '/integrations',
        icon: 'share-alt',
        description: 'Pre-built integrations, ready to install',
      },
      {
        name: 'Support',
        target: '/support',
        icon: 'shield-alt',
        description: 'Contact support with your questions',
      },
      {
        name: 'Events',
        target: '/events',
        icon: 'handshake',
        description: 'See presentations and training information from our previous events',
      },
    ],
  },
  plugins: [
    'gatsby-plugin-react-helmet',
    'gatsby-plugin-sharp',
    'gatsby-plugin-offline',
    'gatsby-transformer-sharp',
    'gatsby-plugin-sass',
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          'gatsby-remark-autolink-headers',
          'gatsby-remark-prismjs',

          {
            resolve: `gatsby-remark-images-contentful`,
            options: {
              // It's important to specify the maxWidth (in pixels) of
              // the content container as this plugin uses this as the
              // base for generating different widths of each image.
              maxWidth: 650,
              linkImagesToOriginal: false,
              showCaptions: true,
            },
          },
        ],
      },
    },
    {
      resolve: `gatsby-plugin-prefetch-google-fonts`,
      options: {
        fonts: [
          {
            family: `Open Sans`,
            variants: [`200`, `300`, `400`, `500`, `600`, `700`],
          },
        ],
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: 'Kinetic Community',
        short_name: 'Community',
        start_url: '/',
        background_color: '#663399',
        theme_color: '#663399',
        display: 'minimal-ui',
        icon: 'src/assets/images/community-favicon.png', // This path is relative to the root of the site.
      },
    },
    {
      resolve: `gatsby-plugin-google-analytics`,
      options: {
        trackingId: 'UA-395321-14',
        respectDNT: true,
      },
    },
    {
      resolve: `gatsby-plugin-sitemap`,
      options: {
        query: `
        {
          site {
            siteMetadata {
              siteUrl
            }
          }
          allSitePage {
            edges {
              node {
                path
                context {
                  algoliaSearch {
                    heirarchy {
                      lvl0
                      lvl1
                      lvl2
                      lvl3
                    }
                  }
                }
              }
            }
          }
        }`,
        exclude: [`/integrations/IntegrationCard`, `/integrations/Sidebar`],
        serialize: ({ site, allSitePage }) =>
          allSitePage.edges.map(edge => {
            const heirarchy =
              edge.node.context && edge.node.context.algoliaSearch
                ? edge.node.context.algoliaSearch.heirarchy
                : null
            const priority =
              heirarchy === null || heirarchy.lvl1 === null
                ? 1.0
                : heirarchy.lvl2 === null
                ? 0.7
                : heirarchy.lvl3 === null
                ? 0.5
                : 0.3
            return {
              url: site.siteMetadata.siteUrl + edge.node.path,
              changefreq: `daily`,
              priority: priority,
            }
          }),
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/assets/images`,
      },
    },
    {
      resolve: 'gatsby-source-contentful',
      options: {
        spaceId: process.env.CONTENTFUL_SPACE_ID || '',
        accessToken: process.env.CONTENTFUL_ACCESS_TOKEN || '',
        environment: process.env.CONTENTFUL_ENVIRONMENT || '',
      },
    },
  ],
}

package.json:

{
  "name": "gatsby-kinetic-community",
  "description": "Kinetic Community",
  "version": "1.0.0",
  "author": "James Davies <james.davies@kineticdata.com>",
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.10",
    "@fortawesome/free-brands-svg-icons": "^5.6.1",
    "@fortawesome/free-regular-svg-icons": "^5.6.1",
    "@fortawesome/free-solid-svg-icons": "^5.6.1",
    "@fortawesome/react-fontawesome": "^0.1.3",
    "algoliasearch": "^3.33.0",
    "animate.css": "^3.7.0",
    "axios": "^0.19.0",
    "bootstrap": "^4.1.3",
    "classnames": "^2.2.6",
    "docsearch.js": "^2.6.2",
    "dotenv": "^6.2.0",
    "emergence.js": "^1.1.2",
    "font-awesome": "^4.7.0",
    "formik": "^1.4.1",
    "gatsby": "^2.0.65",
    "gatsby-cli": "^2.6.5",
    "gatsby-image": "^2.0.23",
    "gatsby-plugin-algolia": "^0.3.0",
    "gatsby-plugin-google-analytics": "^2.0.8",
    "gatsby-plugin-manifest": "^2.0.9",
    "gatsby-plugin-offline": "^2.0.19",
    "gatsby-plugin-prefetch-google-fonts": "^1.4.2",
    "gatsby-plugin-react-helmet": "^3.0.2",
    "gatsby-plugin-sass": "^2.0.7",
    "gatsby-plugin-sharp": "^2.0.15",
    "gatsby-plugin-sitemap": "^2.0.4",
    "gatsby-remark-autolink-headers": "^2.0.12",
    "gatsby-remark-images-contentful": "^2.0.5",
    "gatsby-remark-prismjs": "^3.2.0",
    "gatsby-source-contentful": "^2.0.20",
    "gatsby-source-filesystem": "^2.0.12",
    "gatsby-transformer-remark": "^2.1.15",
    "gatsby-transformer-sharp": "^2.1.8",
    "immutable": "^4.0.0-rc.12",
    "instantsearch.css": "^7.1.0",
    "lodash.flatten": "^4.4.0",
    "modern-normalize": "^0.5.0",
    "modularscale-sass": "^3.0.8",
    "node-sass": "^4.12.0",
    "prismjs": "^1.15.0",
    "react": "^16.6.3",
    "react-autosuggest": "^9.4.2",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.0",
    "react-instantsearch-dom": "^5.6.0",
    "react-share": "^2.4.0",
    "reactstrap": "^6.5.0",
    "reaptcha": "^1.4.0",
    "slugify": "^1.3.4",
    "swagger-ui": "^3.23.4"
  },
  "keywords": [
    "community",
    "kinetic",
    "documentation"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "start": "npm run develop",
    "format": "prettier --write \"src/**/*.js\"",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "devDependencies": {
    "prettier": "^1.15.2"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  }
}

gatsby-node.js:

/**
 * Implement Gatsby's Node APIs in this file.
 *
 * See: https://www.gatsbyjs.org/docs/node-apis/
 */
const path = require(`path`)
require('dotenv').config({
  path: `.env`,
})

// Used to destructure the data prop used by graphql
// If the data prop contains an "edges" prop, we destructure that
const transformData = data => {
  return Object.keys(data).reduce((acc, value) => {
    return Object.assign(
      {
        [value]: data[value]
          ? data[value].edges
            ? data[value].edges.map(({ node }) => node)
            : data[value]
          : '',
      },
      acc
    )
  }, {})
}

// Used to build up the location of a given template to create a page from
const templateComponent = location => path.resolve(`src/templates/${location}`)

exports.createPages = ({ graphql, actions }) => {
  const { createPage } = actions

  // Build Page for each Integration Source
  const loadSources = new Promise(resolve => {
    graphql(`
      {
        integrationSources: allContentfulIntegrationSource {
          edges {
            node {
              id
              slug
              name
              description {
                description
              }
              image
            }
          }
        }
      }
    `).then(result => {
      const { integrationSources } = transformData(result.data)
      integrationSources.forEach(source => {
        const sourceSlug = source.slug
        const path = `/integrations/${sourceSlug}`
        createPage({
          path: path,
          component: templateComponent('Sources/index.js'),
          context: {
            sourceSlug,
            algoliaSearch: {
              objectID: source.id,
              name: source.name,
              path: path,
              image: source.image,
              description:
                source.description !== null
                  ? source.description.description
                  : null,
              heirarchy: {
                lvl0: 'integrations',
                lvl1: `integrations > ${sourceSlug}`,
              },
              tags: [],
            },
          },
        })
      })
      resolve()
    })
  })

  // Build Page for each Handler
  const loadHandlers = new Promise(resolve => {
    graphql(`
      {
        handlers: allContentfulHandler {
          edges {
            node {
              id
              slug
              name
              description {
                description
              }
              integrationType {
                slug
                name
              }
              integrationSource {
                slug
                name
                image
              }
            }
          }
        }
      }
    `).then(result => {
      const { handlers } = transformData(result.data)
      handlers.forEach(handler => {
      if (handler !== null && handler.integrationSource !== null) {
        const sourceSlug = handler.integrationSource.slug
        const handlerSlug = handler.slug
        const path = `/integrations/${sourceSlug}/workflow-handlers/${handlerSlug}`
        createPage({
          path: path,
          component: templateComponent('TaskHandlers/index.js'),
          context: {
            sourceSlug,
            handlerSlug,
            algoliaSearch: {
              objectID: handler.id,
              name: handler.name,
              path: path,
              image: handler.integrationSource.image,
              description:
                handler.description !== null
                  ? handler.description.description
                  : null,
              heirarchy: {
                lvl0: 'integrations',
                lvl1: `integrations > ${sourceSlug}`,
                lvl2: `integrations > ${sourceSlug} > workflow-handlers`,
                lvl3: `integrations > ${sourceSlug} > workflow-handlers > ${handlerSlug}`,
              },
              tags: ['Workflow Handler'],
            },
          },
        })
        }
      })
      resolve()
    })
  })

  // Build Page for each Bridge
  const loadBridges = new Promise(resolve => {
    graphql(`
      {
        bridges: allContentfulBridge {
          edges {
            node {
              id
              slug
              name
              description {
                description
              }
              integrationType {
                slug
                name
              }
              integrationSource {
                slug
                name
                image
              }
              article {
                name
                slug
              }
            }
          }
        }
      }
    `).then(result => {
      const { bridges } = transformData(result.data)
      bridges.forEach(bridge => {
        const sourceSlug = bridge.integrationSource.slug
        const bridgeSlug = bridge.slug
        const path = `/integrations/${sourceSlug}/bridges/${bridgeSlug}`
        createPage({
          path: path,
          component: templateComponent('Bridges/index.js'),
          context: {
            sourceSlug,
            bridgeSlug,
            algoliaSearch: {
              objectID: bridge.id,
              name: bridge.name,
              path: path,
              image: bridge.integrationSource.image,
              description:
                bridge.description !== null
                  ? bridge.description.description
                  : null,
              heirarchy: {
                lvl0: 'integrations',
                lvl1: `integrations > ${sourceSlug}`,
                lvl2: `integrations > ${sourceSlug} > bridges`,
                lvl3: `integrations > ${sourceSlug} > bridges > ${bridgeSlug}`,
              },
              tags: ['Bridges'],
            },
          },
        })
      })
      resolve()
    })
  })

  // Build Page for each Solution
  const loadSolutions = new Promise(resolve => {
    graphql(`
      {
        solutions: allContentfulSolution {
          edges {
            node {
              id
              slug
              name
              icon
              description {
                description
              }
            }
          }
        }
      }
    `).then(result => {
      const { solutions } = transformData(result.data)
      solutions.forEach(solution => {
        const slug = solution.slug
        const path =
          solution.slug === 'platform' || solution.slug === 'support' || solution.slug === 'events'
            ? `/${solution.slug}`
            : `/solutions/${solution.slug}`
        createPage({
          path: path,
          component: templateComponent('Solution/index.js'),
          context: {
            solutionSlug: slug,
            algoliaSearch: {
              objectID: solution.id,
              name: solution.name,
              path: path,
              image: solution.icon,
              description:
                solution.description !== null
                  ? solution.description.description
                  : null,
              heirarchy: {
                lvl0: 'solutions',
                lvl1: `solutions > ${slug}`,
                lvl2: null,
                lvl3: null,
              },
              tags: [],
            },
          },
        })
      })
      resolve()
    })
  })

  // Build Page for each Solution
  const loadPartners = new Promise(resolve => {
    graphql(`
      {
        partners: allContentfulPartner {
          edges {
            node {
              id
              slug
              name
            }
          }
        }
      }
    `).then(result => {
      const { partners } = transformData(result.data)
      partners.forEach(partner => {
        const slug = partner.slug
        const path = `/partners/${partner.slug}`
        createPage({
          path: path,
          component: templateComponent('Partners/index.js'),
          context: {
            partnerSlug: slug,
            algoliaSearch: {
              objectID: partner.id,
              name: partner.name,
              path: path,
              heirarchy: {
                lvl0: 'partners',
                lvl1: `partners > ${slug}`,
                lvl2: null,
                lvl3: null,
              },
              tags: [],
            },
          },
        })
      })
      resolve()
    })
  })
  // Build Page for each Solution Article Type
  const loadArticles = new Promise(resolve => {
    graphql(`
      {
        articles: allContentfulArticle {
          edges {
            node {
              id
              slug
              name
              content {
                childMarkdownRemark {
                  excerpt
                }
              }
              solutionArticleTypes: solutionArticleType {
                id
                solution {
                  slug
                  name
                }
                articleType {
                  slug
                  name
                }
              }
            }
          }
        }
      }
    `).then(result => {
      const { articles } = transformData(result.data)
      // Loop over each article
      articles.forEach(article => {
        const solutionArticleTypes = article.solutionArticleTypes != null ? article.solutionArticleTypes.map(
          solutionArticleType => ({
            ...solutionArticleType,
            solution: solutionArticleType.solution ? solutionArticleType.solution[0]: '',
          })
        ) : null

        // Articles can have multiple article types associated
        // so loop over each solution article type and create an article page for each
        solutionArticleTypes != null ? solutionArticleTypes.forEach(solutionArticleType => {
          const solutionSlug = solutionArticleType.solution.slug
          const articleTypeSlug = solutionArticleType.articleType.slug
          const path =
            solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
              ? `/${solutionSlug}/${articleTypeSlug}/${article.slug}`
              : `/solutions/${solutionSlug}/${articleTypeSlug}/${article.slug}`
          createPage({
            path: path,
            component: templateComponent('Article/index.js'),
            context: {
              solutionArticleTypeId: solutionArticleType.id,
              articlePartner: article.partner,
              articleSlug: article.slug,
              algoliaSearch: {
                objectID: article.id,
                name: article.name,
                path: path,
                image: null,
                description:
                  article.content !== null
                    ? article.content.childMarkdownRemark.excerpt
                    : null,
                heirarchy: {
                  lvl0:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? solutionSlug
                      : 'solutions',
                  lvl1:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? `${solutionSlug} > ${articleTypeSlug}`
                      : `solutions > ${solutionSlug}`,
                  lvl2:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? `${solutionSlug} > ${articleTypeSlug} > ${article.slug}`
                      : `solutions > ${solutionSlug} > ${articleTypeSlug}`,
                  lvl3:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? null
                      : `solutions > ${solutionSlug} > ${articleTypeSlug} > ${
                          article.slug
                        }`,
                },
                tags: [
                  solutionArticleType.articleType.name,
                  solutionArticleType.solution.name,
                ],
              },
            },
          })
        }) : ''
      })
      resolve()
    })
  })

  // Build Page for each Solution Article Type
  const loadPartnerArticles = new Promise(resolve => {
    graphql(`
      {
        articles: allContentfulPartnerArticle {
          edges {
            node {
              id
              slug
              name
              content {
                childMarkdownRemark {
                  excerpt
                }
              }
              partner {
                slug
                name
              }
              partner___category {
                name
              }
            }
          }
        }
      }
    `).then(result => {
      const { articles } = transformData(result.data)
      // Loop over each article
      articles.forEach(article => {

        // Articles can have multiple article types associated

          const path =
            `/partners/${article.partner.slug}/${article.slug}`
          createPage({
            path: path,
            component: templateComponent('PartnerArticle/index.js'),
            context: {
              articlePartner: article.partner,
              articleSlug: article.slug,
              algoliaSearch: {
                objectID: article.id,
                name: article.name,
                path: path,
                image: null,
                description:
                  article.content !== null
                    ? article.content.childMarkdownRemark.excerpt
                    : null,
                heirarchy: {
                  lvl0: 'partners',
                  lvl1: `partners > ${article.partner.slug}`,
                  lvl2: `partners > ${article.partner.slug} > ${article.slug}`,

                },
                tags: [
                  article.partner.name,
                ],
              },
            },

      })
      resolve()
    })
  })
  })

  // Build Page for each Solution Article Type
  const loadArticleTypes = new Promise(resolve => {
    graphql(`
      {
        solutionArticleTypes: allContentfulSolutionArticleType {
          edges {
            node {
              id
              name
              solution {
                slug
                name
              }
              articleType {
                slug
                name
              }
            }
          }
        }
      }
    `).then(result => {
      const { solutionArticleTypes } = transformData(result.data)
      solutionArticleTypes
        .map(solutionArticleType => ({
          ...solutionArticleType,
          solution: solutionArticleType.solution != null ? solutionArticleType.solution[0] : '',
        }))
        .forEach(solutionArticleType => {
          const solutionSlug = solutionArticleType.solution.slug
          const articleTypeSlug = solutionArticleType.articleType.slug
          const path =
            solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
              ? `/${solutionSlug}/${articleTypeSlug}`
              : `/solutions/${solutionSlug}/${articleTypeSlug}`

          createPage({
            path: path,
            component: templateComponent('ArticleType/index.js'),
            context: {
              solutionArticleTypeId: solutionArticleType.id,
              algoliaSearch: {
                objectID: solutionArticleType.id,
                name: solutionArticleType.name,
                path: path,
                image: null,
                description: null,
                heirarchy: {
                  lvl0:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? solutionSlug
                      : 'solutions',
                  lvl1:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? `${solutionSlug} > ${articleTypeSlug}`
                      : `solutions > ${solutionSlug}`,
                  lvl2:
                    solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                      ? null
                      : `solutions > ${solutionSlug} > ${articleTypeSlug}`,
                  lvl3: null,
                },
                tags: [solutionArticleType.solution.name],
              },
            },
          })
        })
      resolve()
    })
  })

  // Build Page for each Tag Pages
  const loadTagPages = new Promise(resolve => {
    graphql(`
      {
        solutionArticleTypes: allContentfulSolutionArticleType {
          edges {
            node {
              id
              name
              solution {
                slug
                name
              }
              articleType {
                slug
                name
              }
              articles: article {
                name
                slug
                tags
              }
            }
          }
        }
      }
    `).then(result => {
      const { solutionArticleTypes } = transformData(result.data)
      solutionArticleTypes
        .map(solutionArticleType => ({
          ...solutionArticleType,
          solution: solutionArticleType.solution != null ? solutionArticleType.solution[0] : '',
        }))
        .forEach(solutionArticleType => {
          const solutionSlug = solutionArticleType.solution.slug
          const articleTypeSlug = solutionArticleType.articleType.slug

          let tags = []
          const tagGroups =
            solutionArticleType.articles !== null
              ? solutionArticleType.articles.map(article => {
                  return article.tags
                })
              : []

          const tagsMap =
            tagGroups !== null
              ? tagGroups.map(group => {
                  if (group !== null) {
                    group.map(tag => {
                      if (tags.indexOf(tag) === -1) {
                        tags.push(tag)
                      }
                      return tag
                    })
                  } else {
                    return null
                  }
                })
              : []

          tags.forEach(tag => {
            const path =
              solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                ? `/${solutionSlug}/${articleTypeSlug}/${tag}`
                : `/solutions/${solutionSlug}/${articleTypeSlug}/${tag}`

            createPage({
              path: path,
              component: templateComponent('Tags/index.js'),
              tag: tag,
              context: {
                solutionArticleTypeId: solutionArticleType.id,
                selectedTag: tag,
                algoliaSearch: {
                  objectID: solutionArticleType.id,
                  name: `Articles - ${tag}`,
                  path: path,
                  image: null,
                  description: null,
                  heirarchy: {
                    lvl0:
                      solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                        ? solutionSlug
                        : 'solutions',
                    lvl1:
                      solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                        ? `${solutionSlug} > ${articleTypeSlug}`
                        : `solutions > ${solutionSlug}`,
                    lvl2:
                      solutionSlug === 'platform' || solutionSlug === 'support' || solutionSlug === 'events'
                        ? null
                        : `solutions > ${solutionSlug} > ${articleTypeSlug}`,
                    lvl3: null,
                  },
                  tags: [solutionArticleType.solution.name],
                },
              },
            })
          })
        })
      resolve()
    })
  })

  // Build all pages
  return Promise.all([
    loadSources,
    loadHandlers,
    loadSolutions,
    loadPartners,
    loadArticles,
    loadPartnerArticles,
    loadArticleTypes,
    loadTagPages,
  ])
}

exports.onCreateWebpackConfig = ({ actions }) => {
  actions.setWebpackConfig({
    resolve: {
      alias: {
        components: path.resolve(__dirname, 'src/components'),
        templates: path.resolve(__dirname, 'src/templates'),
        helpers$: path.resolve(__dirname, 'src/helpers.js'),
        styles: path.resolve(__dirname, 'src/assets/styles'),
        images: path.resolve(__dirname, 'src/assets/images'),
      },
    },
  })
}

gatsby-browser.js:

import SwaggerUI from 'swagger-ui'
window.SwaggerUI = SwaggerUI

gatsby-ssr.js: N/A

github-actions[bot] commented 4 years ago

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

chandlervdw commented 4 years ago

I have this issue as well.

github-actions[bot] commented 4 years ago

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

wardpeet commented 4 years ago

Hi!

If things I private, you can always reach out on ward@gatsbyjs.com

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! πŸ’œ

danabrit commented 4 years ago

Closed due to lack of reproduction.

Mike-Logit commented 3 years ago

I'm having issues with this exact problem except its 100% of the time. I might have to abandon this plugin. Wish there was a fix.

Pernick commented 2 years ago

I am having this issue on mac, 100 % of the time. From what I found, there seems to be many reasons why this can happen. Someone even recommended resizing the terminal window, which fixed the issue for some.

Have you at least found any way to debug this better?

gvorbeck commented 2 years ago

I was running into this too but remembered I had just allowed eslint to fix a bunch of syntax problems in gatsby-node.js that it apparently didn't like. I'm afraid to go in there again and test which exact "fix" created the problem but reverting the changes seems to have cleared the blockage. For now.