Error UNHANDLED EXCEPTION write EPIPE

Hello i’m trying to deploy my gatsby application on netlify but i’m unable to deploy

getting error

error UNHANDLED EXCEPTION write EPIPE

“build.command” failed

FULL build log & build settings screenshot

Build log screenshot :point_down:

Build setting screenshot :point_down:

I tried

  • npm run build
  • CI = npm run build
  • gatsby build
  • CI = gatsby build

Nothing works for me I’m trying to deploy gatsby application from last 2 days

Can anyone help troubleshoot?

Netlify site name: xenodochial-hugle-0a6492
.netlify.app

I’m not sure what other details I can provide to make this question better. But I’m happy to send more info if needed.
Thank you!

hi there,

Can you take a look at this issue and see if it is the same thing you are seeing?

1 Like

I’m seeing this same error frequently (but not every time) on my builds and have been ever since we upgraded from Gatsby 3 to Gatsby 4. The link above was closed with the implication it was due to a problem with gatsby-remark-images-contentful, but I’m not using that package.

1 Like

If you want I can piggyback onto this and provide project information and logs, but the error is exactly what is shown in the OPs log snippet.

Is this a memory issue as is suggested in this?

Hey @witcradg,

Yes, when using Gatsby image, this totally happens due to memory issues. You can try one of the following:

  1. Don’t use AVIF or WEBP image formats in the output.
  2. Don’t use super large images to be optimised.

Hello! I’m delighted to say we have a fix for this. It turns out it was not a memory issue after all, but was a bug in Gatsby. It doesn’t appear when building locally because most people are using multi-core machines and the bug only appears when using a single worker. We worked with the Gatsby team to release a fix which went out today. If you update your site to gatsby@4.13.1 then it should fix the problem.

1 Like