dev10
October 17, 2024, 8:24am
1
Getting build errrors:
9:06:18 AM: success Execute page configs - 0.048s
9:06:18 AM: success Caching Webpack compilations - 0.000s
9:06:44 AM: Killed
9:06:44 AM: error Command failed with exit code 137.
9:06:44 AM: info Visit yarn run | Yarn for documentation about this command.
9:06:44 AM:
9:06:44 AM: “build.command” failed
9:06:44 AM: ────────────────────────────────────────────────────────────────
9:06:44 AM:
9:06:44 AM: Error message
9:06:44 AM: Command failed with exit code 137: node --max-old-space-size=16384 && yarn run build
9:06:44 AM:
9:06:44 AM: Error location
9:06:44 AM: In Build command from Netlify app:
9:06:44 AM: node --max-old-space-size=16384 && yarn run build
Error code is 137 and have been given this guide as a support. However this doesn’t work so looking for more ideas.
Last updated by Netlify Support: October 2024
Are you struggling to get your build working? Most build errors are caused by problems in code or data, and for those errors, our best guide / general starting place for debugging build troubles is this one:
But, sometimes your build is working fine and suddenly ends with some inscrutable errors that don’t seem to be “about” your code or site even. Perhaps you see an error message like this in your builds?
2:28:35 PM: <--- Last few GCs --->
2:…
Build has just suddenly started failing
@dev10 The Support Guide you linked is the main one for memory issues.
It sounds like you’ve attempted a ‘quick fix’ with #3 (the max-old-space-size
suggestion)
If that didn’t work, then you’ll likely need to fall back to #1 and put more effort into determining why your build is consuming so much memory that it’s being killed.
There’s no switch that can be toggled toggle to provide more build memory.
There’s also no specific guide for how to profile your project as every project is obviously different.
dev10
October 17, 2024, 9:11am
3
Is there any reason why this has just suddenly started to happen?
As I can look into this further, but locally the build completes fine, only on Netlify is this appearing to be an issue
@dev10 If it’s the memory that your build is consuming:
there could be any number of reasons why it would suddenly start to happen
your local environment probably provides more memory
I can’t guess at what it might be.
The main thread you linked does also link to this other thread which has more information:
https://answers.netlify.com/t/support-guide-making-sure-your-builds-use-appropriate-resources-for-netlifys-build-system/5349