question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gatsby develop: page query hanging

See original GitHub issue
open and validate gatsby-configs - 0.067s
success load plugins - 7.837s
warn The Google Analytics plugin requires a tracking ID. Did you mean to add it?
success onPreInit - 0.211s
success initialize cache - 0.024s
success copy gatsby files - 0.175s
warn gatsby-plugin-feed-mdx was initialized in gatsby-config.js without a feeds option.
This means that the plugin will use the internal RSS feed creation, which may not match your use case.
This behavior will be removed in the next major release of gatsby-plugin-feed.
For more info, check out: https://gatsby.dev/adding-rss-feed
success onPreBootstrap - 0.070s
success createSchemaCustomization - 0.017s
success Checking for changed pages - 0.003s
success source and transform nodes - 2.948s
success building schema - 0.567s
success createPages - 0.052s
success Checking for changed pages - 0.003s
success createPagesStatefully - 0.123s
success update schema - 0.042s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.389s
success onPostBootstrap - 0.400s
info bootstrap finished - 24.749s
success onPreExtractQueries - 0.004s
success extract queries from components - 0.732s
success write out requires - 0.117s
success run static queries - 0.150s - 2/2 13.36/s
warn Query takes too long:
File path: /Volumes/MacStorage/bibo-demoblog/src/templates/blog-post.js
URL path: /blog/hello-world/
Context: {
    "slug": "/hello-world/",
    "previous": null,
    "next": {
        "fields": {
            "slug": "/my-second-post/"
        },
        "frontmatter": {
            "title": "My Second Post!"
        }
    }
}
warn Query takes too long:
File path: /Volumes/MacStorage/bibo-demoblog/src/pages/blog.js
URL path: /blog/
[============================]   17.683 s 13/13 100% Generating image thumbnails
[================            ]   17.569 s 6/10 60% run page queries

Tried gatsby clean, Updated gatsby from 2.24.37 to .2.24.47

module.exports = {
  siteMetadata: {
    title: `Bibo-gatsby-cms-demoblog`,
    author: `Biboswan98`,
    description: `A demo starter personal blog with styled components, dark mode, and Netlify CMS.`,
    siteUrl: `https://bibo-gatsby-cms-demoblog.netlify.com/`,
    social: {
      twitter: `Biboswan98`,
    },
  },
  plugins: [
    `gatsby-plugin-netlify-cms`,
    `gatsby-plugin-styled-components`,
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    `gatsby-plugin-offline`,
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-feed-mdx`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/content/blog`,
        name: `blog`,
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/content/assets`,
        name: `assets`,
      },
    },
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [".mdx", ".md"],
        gatsbyRemarkPlugins: [
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 590,
            },
          },
          {
            resolve: `gatsby-remark-responsive-iframe`,
            options: {
              wrapperStyle: `margin-bottom: 1.0725rem`,
            },
          },
          {
            resolve: `gatsby-remark-vscode`,
          },
          {
            resolve: `gatsby-remark-copy-linked-files`,
          },
          {
            resolve: `gatsby-remark-smartypants`,
          },
        ],
        plugins: [`gatsby-remark-images`],
      },
    },
    {
      resolve: `gatsby-plugin-google-analytics`,
      options: {
        // edit below
        // trackingId: `ADD YOUR TRACKING ID HERE`,
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `Gatsby Starter Blog`,
        short_name: `GatsbyJS`,
        start_url: `/`,
        background_color: `#ffffff`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        // edit below
        icon: `content/assets/favicon.png`,
      },
    },
    {
      resolve: `gatsby-plugin-typography`,
      options: {
        pathToConfigModule: `src/utils/typography`,
      },
    },
  ],
}

Node version: v10.16.3 (npm v6.9.0) OS: MacSierra

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
vladarcommented, Aug 27, 2020

To recap: the problem is that any node mutations (createNode, deleteNode, etc) are now deferred until develop machine reaches the waiting state. But in this example, a custom resolver awaits when node mutation completes. It doesn’t allow the query to finish and transition to waiting state. So it’s a chicken and egg problem.

I don’t have enough context on our state charts yet to fix this correctly. The only idea I have so far is to debounce the runMutationBatch call when we see ADD_NODE_MUTATION in runningQueries state.

0reactions
ascorbiccommented, Sep 9, 2020

I’m closing this because it should be fixed in the latest version. I have tested it with @swkeever 's site and confirmed that it now works.

If anybody is still having the problem with the latest verison of gatsby, please open a new ticket that includes the output from gatsby develop --verbose, with a link to a reproduction. Thanks everyone for the reports!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Common Errors - Gatsby
This guide is meant as a reference for common errors that have tripped up other Gatsby users. Problems with the cache. Running a...
Read more >
'gatsby develop' command struck without error. GIves no error ...
I am new to Gatsby, every time I run the command gatsby develop , my terminal struck. It gives the following output and...
Read more >
Speed up your Gatsby Build when using GraphCMS
1. Use Conditional Page Builds. Whenever you run gatsby build , all pages are recreated. · 2. Parallel processing of GraphQL queries. The...
Read more >
Building a Photo Site With GatsbyJS and the WordPress.com ...
So, I elected to build an Instagram-esque photo sharing site. ... You use GraphQL queries for each page to tell Gatsby the data...
Read more >
Learning the great “Gatsby JS” — a tutorial for beginners
Static Site Generators are tools used develop static sites, effectively and efficiently. And finally how does GatsbyJs work ? What separates ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found