Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby build hangs on createPagesStatefully #3825

Closed
wardy opened this issue Feb 2, 2018 · 3 comments
Closed

Gatsby build hangs on createPagesStatefully #3825

wardy opened this issue Feb 2, 2018 · 3 comments

Comments

@wardy
Copy link

wardy commented Feb 2, 2018

Description

I'm trying to follow the steps on how to deploy a Github Pages deployment here https://www.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/#___gatsby. However when I run yarn run deploy or npm run deploy gatshby build hangs on createPagesStatefully indefinitely ( I have let it run for 15 mins with no result)

Environment

Gatsby version: 1.1.34
Node.js version: v8.9.0
Operating System: High Sierra

Actual result

yarn run v1.3.2
$ gatsby build && gh-pages -d public -b master
success delete html files from previous builds — 0.047 s
success open and validate gatsby-config.js — 0.004 s
success copy gatsby files — 0.018 s
success onPreBootstrap — 0.004 s
success source and transform nodes — 0.014 s
success building schema — 0.068 s
success createLayouts — 0.023 s
success createPages — 0.001 s
⠄ createPagesStatefully
@m-allanson
Copy link
Contributor

@wardy see #3813

@wardy
Copy link
Author

wardy commented Feb 2, 2018

Thanks, I missed that. Should I close this issue?

@wardy wardy closed this as completed Feb 2, 2018
@adamtyoung
Copy link

adamtyoung commented Sep 23, 2019

Description

I am having this problem too. Site is building fine until I drop this code into my gatsby-node.js:

exports.onCreatePage = ({ page, actions }) => {
  const { createPage, deletePage } = actions
  // get date
  let newDate = new Date()
  let date = newDate.getDate()
  let month = newDate.getMonth() 
  let year = newDate.getFullYear()
  const today = (foo)
  console.log(today)

  deletePage(page)
  createPage({
    ...page,
    context: {
      ...page.context,
      currentDate: today,
    },
  })
}

at which point running gatsby develop will freeze on createPagesStatefully.

Environment

Gatsby version: 2.15.18
Node v11.9.0
OS X Mojave

Actual output

~/sports ❯❯❯ gatsby develop                                                                                       ✘ 130 today ✱
success open and validate gatsby-configs - 0.048 s
success load plugins - 0.369 s
success onPreInit - 0.013 s
success initialize cache - 0.015 s
success copy gatsby files - 0.087 s
success onPreBootstrap - 0.024 s
success source and transform nodes - 4.600 s
success Add explicit types - 0.013 s
success Add inferred types - 0.182 s
success Processing types - 0.100 s
success building schema - 0.343 s
success createPages - 0.010 s
⠋ createPagesStatefully

This was referenced Sep 5, 2021
This was referenced Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants