-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 develop build become stuck with node v12.x on Mac? #25859
Comments
The issue seems to be happening also on Gatsby Cloud I tried building my markdown based gatsby website with Gatsby Cloud which uses the following versions of Node and Gatsby for its build env:
The entire build got timed out after 2 h 49m 59s. With the raw log hanged at:
Again, no issue with Node v10. Not sure if anyone else has encountered the same experience on Gatsby Cloud. |
Also ran into this with Node 12:
|
Update: Indeed it was the problem with node version. I really had to be on node ============================================================== tl;dr: I was stuck on I've tested on both node The problem for me was
It still didn't work for me. So I continued the If npm install still fails guide:
After downloading the 6GB Common tools for Visual Studio 2015, running |
The original issue is likely duplicate of #27184 (comment) - TL/DR |
Closing this as stale since in the meantime Gatsby v4 and updated related packages were released. Please try with the latest versions and if you still see this problem open a new bug report (it must include a minimal reproduction). |
Description
After some upgrade of the local gatsby development environment with the latest dependencies and Node version (from v10.x => v12.x), I noticed
gatsby develop
build started to hang at the end without completing the build for the development environment with webpack server serving the content for local testing.Spend over a week by downgrading/upgrading the dependencies and hit several issues along the way e.g. #25607 and finally ended up finding its the Node version 12.x the local gatsby build is not compatible with.
I am not sure if anyone else experienced the same issue when using Node version 12.x today, but below I have compiled the table with permutation of different gatsby dependencies I tested over the week of trial and error and hopefully help the next person who may bump into the same issue.
Steps to reproduce
Try with one of the following Node versions:
Run with the gatsby dependencies below by running
gatsby develop
.Results are recorded in the table below.
Note that due to the way that gatsby's dependency line up are defined, they are not locked as mentioned on #25607 (comment), downgrading gatsby dependency with specific build of e.g.
gatsby-cli
require usingyarn
's resolution feature.e.g.
Run again will get Error: listen EADDRINUSE: address already in use 0.0.0.0:5050
Force quit the hanged node process and run again and stuck at success run page queries - 0.052s - 3/3 57.57/s
stuck after success run page queries - 105.787s - 156/156 1.47/s
fix with pin xstate 4.10.0
(only work with v10.21.0)
stuck after success run queries - 132.094s - 157/157 1.19/s
⠙ start webpack server
✨ Done in 1983.95s.gatsby-transformer-sharp: 2.1.19
(sharp:39770): GLib-CRITICAL **: 23:21:35.327: g_once_init_leave: assertion ‘result != 0’ failed
(sharp:39770): GLib-GObject-CRITICAL **: 23:21:35.327: g_type_register_static: assertion ‘parent_type > 0’ failed
(sharp:39770): GLib-CRITICAL **: 23:21:35.327: g_once_init_leave: assertion ‘result != 0’ failed
Expected result
The
gatsby develop
build should succeed without getting stuck indefinitely.Actual result
The
gatsby develop
build hanged indefinitely.gatsby develop
build does not produce the following:Some times, Node process does bind against the port but accessing it via browser does not return the HTML.
After terminating it with
ctrl+c
from CLI, you would have to manually terminate the Node processes from Activity Monitor (Mac)Environment
Workaround
Fall back the Node version from 12.x ==> v10.x or v10.21.0
Result
The build with
gatsby develop
will complete.Tested with the gatsby dependency:
The text was updated successfully, but these errors were encountered: