-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Build failing with heap out of memory error, gatsby@>=2.11.0 #16499
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
Comments
I'm seeing the same sort of memory leak, starting in I'm currently using Node.js Is there anything else we can do to help get this fixed? This is a pretty major problem. |
Yeah, it's not about that specific plugin, that was just one example. Maybe see if you can get someone's attention in #15213? |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Please create an up-to-date reproduction if you're still seeing this issue. The linked issue was fixed with #15213 (comment) - thanks! |
Description
Adding
gatsby-plugin-use-dark-mode
(my plugin) causes the Gatsby build to fail with a JavaScript heap out of memory error, as other people have reported with other plugins (e.g.gatsby-plugin-netlify-cms
), specifically when usingnpm
(notyarn
) and Node.js prior to v12.I suspect this is happening due to
node_modules
being run through Babel now and this plugin depends on Terser, which is a fairly hefty import. If that is the case, do plugin authors need to be conscious of this and include modifications to the Gatsby Webpack config to remove thedependencies
rule likegatsby-plugin-netlify-cms
did?cc @wardpeet
Similar issues:
Also related:
Steps to reproduce
gatsby-plugin-use-dark-mode
withnpm
Example project:
https://github.com/wKovacs64/gpudm-test
Expected result
Successful build.
Actual result
Failed build due to JavaScript heap out of memory error:
Environment
As mentioned previously, this only seems to present itself when using
npm
(notyarn
) and Node.js version prior to v12.Reproduced in multiple environments (CI and local), but current local is:
Workarounds
gatsby
to2.10.5
yarn
(maybe?)The text was updated successfully, but these errors were encountered: