-
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 build fails with Javascript heap out of memory when upgrading beyond 2.21.40 #25858
Comments
@tim-line Can you try running gatsby develop with I suspect we aren't passing through node options to the child process (develop has a parent and child process now where the child is the main gatsby process which is hitting the allocation error) |
@sidharthachatterjee I've tried running:
And get the following error:
Am I missing something or running this incorrectly? |
That's cause Try running |
@sidharthachatterjee Thanks - appreciate this may not strictly be a gatsby issue. I've tried adding the following but still get the same error:
Have also tried running this direct from cmd prompt. Any further help much appreciated! |
@gatsbybot @sidharthachatterjee Any chance of reopening this as the solution isn't working for me. I'd also like to understand why this works fine before upgrading from 2.21.40. Thanks. |
@tim-line Just to confirm - the build works on Also is it possible to get access to your project somehow to reproduce? Or maybe you can prepare a minimum reproduction? |
Hello gatsby team, I have the same issue when upgrading from "^2.24.50", to "^2.24.53". This is the stack trace at development mode
and this on build is not progressing
|
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
I'm going to close this issue as the topic is very generic and is bound to attract unrelated issues. If you've come here to find a solution for an OOM ("Out Of Memory") issue, please try to bump the memory first (either If you think you have a relatively small site / few images and getting an OOM, please open a new issue. Make sure to post a reproduction too and as much info as possible. Feel free to tag me into it. Going to close this and lock it. Thank you 💜 |
Description
My build runs fine running Gatsby 2.21.40 but upgrading Gatsby beyond this version throws a javascript heap out of memory error during the build and develop process. Increasing max-old-space-size doesn't seem to make any difference (unless I am doing this incorrectly - I'm appending the following for the develop command when run from the command line: "node --max-old-space-size=8192 node_modules/gatsby/dist/bin/gatsby.js develop").
This appears to be currently failing at the 'createPages' step. The stack trace reads as:
Steps to reproduce
Run the develop command using: 'node --max-old-space-size=8192 node_modules/gatsby/dist/bin/gatsby.js develop' or 'gatsby develop'
This is currently for the client project which is in development and uses a custom source plugin so I can't share the plugin publically. I may be able to share a test case privately if that is an option.
Expected result
Build should run without issue - it does prior to upgrading beyond 2.21.40
Actual result
Build fails with javascript heap out of memory error.
Environment
Gatsby info for failing build:
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
Binaries:
Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.24.4 => 2.24.4
gatsby-background-image: ^1.1.1 => 1.1.1
gatsby-image: ^2.4.13 => 2.4.13
gatsby-plugin-google-tagmanager: ^2.3.11 => 2.3.11
gatsby-plugin-instagram-embed: ^2.0.1 => 2.0.1
gatsby-plugin-manifest: ^2.4.18 => 2.4.18
gatsby-plugin-offline: ^3.2.18 => 3.2.18
gatsby-plugin-preact: ^3.3.2 => 3.3.2
gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10
gatsby-plugin-remove-console: 0.0.2 => 0.0.2
gatsby-plugin-sharp: ^2.6.19 => 2.6.19
gatsby-plugin-twitter: ^2.3.10 => 2.3.10
gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4
gatsby-source-filesystem: ^2.3.20 => 2.3.20
gatsby-transformer-sharp: ^2.5.11 => 2.5.11
npmGlobalPackages:
gatsby-cli: 2.12.51
Gatsby info for succesful build:
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
Binaries:
Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.8.4
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.21.40 => 2.21.40
gatsby-background-image: ^1.1.1 => 1.1.1
gatsby-image: ^2.2.37 => 2.4.6
gatsby-plugin-google-tagmanager: ^2.3.4 => 2.3.4
gatsby-plugin-instagram-embed: ^2.0.1 => 2.0.1
gatsby-plugin-manifest: ^2.2.34 => 2.4.10
gatsby-plugin-offline: ^3.0.30 => 3.2.8
gatsby-plugin-preact: ^3.3.2 => 3.3.2
gatsby-plugin-react-helmet: ^3.1.18 => 3.3.3
gatsby-plugin-remove-console: 0.0.2 => 0.0.2
gatsby-plugin-sharp: ^2.3.10 => 2.6.10
gatsby-plugin-twitter: ^2.3.3 => 2.3.3
gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4
gatsby-source-filesystem: ^2.1.43 => 2.3.10
gatsby-transformer-sharp: ^2.3.9 => 2.5.4
npmGlobalPackages:
gatsby-cli: 2.12.51
The text was updated successfully, but these errors were encountered: