Running gatsby develop
_sometimes_ hangs on createPagesStatefully
, every 3-5 runs, it seems.
npm install -g gatsby-cli
gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
cd hello-world
gatsby develop
ctrl-c
Build should complete and serve on localhost:8000 with 100% success from fresh installation if no changes were made.
Build hangs on createPagesStatefully
every few runs.
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Languages:
Python: 3.7.4 - /usr/local/opt/python/libexec/bin/python
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0.1
Safari: 13.0.1
npmPackages:
gatsby: ^2.15.22 => 2.15.22
npmGlobalPackages:
gatsby-cli: 2.7.50
Hi! Sorry to hear that you're running into issues.
I followed your reproduction steps but 10/10 runs worked fine for me. I can't reproduce the issue you're having sadly.
My information:
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Shell: 5.7.1 - /opt/local/bin/zsh
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.17.3 - /opt/local/bin/yarn
npm: 6.11.2 - ~/.nvm/versions/node/v10.16.0/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0
Safari: 13.0.1
npmPackages:
gatsby: ^2.15.22 => 2.15.22
npmGlobalPackages:
gatsby-cli: 2.7.42
Maybe try updating your npm version or downgrade Node to v10.x
This is gonna sound weird but try resizing your terminal window...see here: https://github.com/gatsbyjs/gatsby/issues/17131
It sounds like what is happening to a group of us. Not sure what is causing it yet but resizing the terminal window seems to fix it for some odd reason. I have had it hang on both createPagesStatefully and Source and Transform Nodes
@LekoArts Very interesting. Will try npm update tonight (different machine). Otherwise will try reading through the issue that @ehowey linked, especially I noticed someone who suggested gatsby clean
which I haven't tried yet, and resizing the terminal window.
It seems like there are a lot of very similar issues with commands hanging, but at different steps and under different circumstances. I noticed some of these but because the details were different, opened a new issue. Should I have used an existing issue instead, even if the circumstances are different?
Would the community have any interest in creating a meta issue to link and track all of these similar hanging-build issues?
I'm having a similar issue. I thought it was my node installation at first. I'm seeing this also on Source and Transform nodes
as @ehowey mentioned. Really my only workaround is to stop the command and re-run it until it works (typically 2-4 attempts). I've completely reinstalled gatsby-cli, Node 10, 11, and 12, as well as reload dependencies.
^ @josefaidt that's very, very similar to what I was experiencing.
FWIW here is my Gatsby info
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Shell: 3.0.2 - /usr/local/bin/fish
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/local/bin/python
Browsers:
Chrome: 77.0.3865.90
Safari: 12.1.2
npmGlobalPackages:
gatsby: 2.0.91
and the repo where I'm experiencing this the most. I've also started noticing it with mdx-deck
theme too since it uses Gatsby.
I know it sounds really odd but what has fixed this for a group of us is resizing your terminal window. Physically drag it bigger or smaller in your development environment you are using. I know this sounds like a really odd fix but it works - I don鈥檛 yet understand why it works.
Let's close this in favor of https://github.com/gatsbyjs/gatsby/issues/17131, having multiple issues open complicates things. Thanks!
@LekoArts I think there are different issues. The terminal fix doesn't seem to be the same issue as #17131 . I think myself and others in this thread are having a UI issue which I think is related to the ink spinner but haven't yet confirmed that this fixes the issue since its intermittent - happens maybe every 1 out of 5 runs of yarn develop
for me. I was going to open a separate UI related issue for this independent of the ones people are having due to large files etc.
I am having this issue as well still. Resizing the terminal window immediately makes the build continue.
@CathyMacars @ehowey I made a new issue here as it looks like this thread is being ignored being closed. Please pipe in over there so that devs can see this is really an issue as weird as it is. Perhaps post your gatsby environment gatsby info --clipboard
there as well as what terminal you are using. Perhaps there is a common thing here.
Most helpful comment
This is gonna sound weird but try resizing your terminal window...see here: https://github.com/gatsbyjs/gatsby/issues/17131
It sounds like what is happening to a group of us. Not sure what is causing it yet but resizing the terminal window seems to fix it for some odd reason. I have had it hang on both createPagesStatefully and Source and Transform Nodes