Getting an error "Command failed with exit code 137: yarn run build" and it looks like just a timeout

Sitename: bonjoro-marketing.netlify.app

I’m getting this error when building in netlify - I’m running the same command on my local and I don’t encounter the same issue. I feel like this could be related to timeout because we are building quite a few pages and because it was Killed (I’m not sure).

Thank you.

@bonjoro-dev Are you able to provide the full build log?
The section that you have screenshot doesn’t provide much context for seeing what may have triggered it.

Have you checked the link that the error provides, which links to other discussions around that error code:

I can but I prefer to send it through email. Send me your email address.

To what it’s worth, there’s no build error other than the code 137.

@bonjoro-dev I’m not Netlify staff but just a community member, if you can’t provide the details publicly that’s fine, you’ll just have to wait for Netlify support.

While there may be no other build error than the 137, what’s frequently important with errors is “where they occur”, and “what the build was doing when they occurred”.

For example if the build is processing images prior to saying killed, then you can take a wild guess that you’re running out of memory.

The part that you’ve screenshot, the fact the build has exited and the error code, are often borderline useless.

It’s why the template for making a post on the forum suggests that you provide access to your full build log, as it’s frequently necessary to see what build command is being run, as people often say they’re doing one thing, but the log shows they’re actually doing something else.

I’ve increased the node stack size, and now I’m getting a different error.

@nathanmartin Here’s the full log

@bonjoro-dev Your build is throwing warnings, which will cause the build to fail unless CI is set to false.

You can try adding CI= to your build command.

cross-env NODE_OPTIONS='--max-old-space-size=8192' CI= next build

@nathanmartin I tried but didn’t worked. Adding CI= didn’t make any difference nor removing the warnings (I disabled the eslint warnings on build).

Here’s the updated log.

Thank you!

It never removes the warnings, it just prevents them from causing the built to fail IF that is what is causing it to fail, (which it may not be - it’s just something I spotted which does commonly cause builds to fail).

@nathanmartin the issue is intermittent. It was able to run successfully once, but when I tried re-deploy again it fails.

Could be running out of memory. Really frustrating.

@bonjoro-dev You certainly might be, here’s a Support Guide for memory usage: