I’m having the same issue on a relatively small blog type site I administer for a friend that uses NetlifyCMS, Gatsby and builds and deploys on Netlify.
It’s fine on v4.6.2 but the build fails every time when updated to v4.9.2.
I’ve added my details to an open Gatsby Github issue:
opened 10:14PM - 04 Mar 22 UTC
closed 06:27AM - 06 May 22 UTC
type: bug
status: confirmed
topic: media
### Preliminary Checks
- [X] This issue is not a duplicate. Before opening a … new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- [X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
### Description
When trying to run Gatsby latest `4.9.1` I get this error
```
4:35:23 PM: success write out requires - 0.005s
4:36:27 PM: success Building production JavaScript and CSS bundles - 63.377s
4:37:03 PM: success Building HTML renderer - 36.060s
4:37:03 PM: success Execute page configs - 0.380s
4:37:03 PM: success Caching Webpack compilations - 0.001s
4:37:03 PM: error (node:2227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [PassThrough]. Use emitter.setMaxListeners() to increase limit
4:37:03 PM: (Use `node --trace-warnings ...` to show where the warning was created)
4:37:07 PM: success run queries in workers - 3.599s - 37/37 10.28/s
4:37:09 PM: success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 120.528s - 5/5 0.04/s
4:37:09 PM: error UNHANDLED EXCEPTION write EPIPE
4:37:09 PM:
4:37:09 PM:
4:37:09 PM: Error: write EPIPE
4:37:09 PM:
4:37:09 PM: - child_process:864 ChildProcess.target._send
4:37:09 PM: node:internal/child_process:864:20
4:37:09 PM:
4:37:09 PM: - child_process:737 ChildProcess.target.send
4:37:09 PM: node:internal/child_process:737:19
4:37:09 PM:
4:37:09 PM: - index.js:291 WorkerPool.sendMessage
4:37:09 PM: [repo]/[gatsby-worker]/dist/index.js:291:19
4:37:09 PM:
4:37:09 PM: - worker-messaging.ts:22
4:37:09 PM: [repo]/[gatsby]/src/utils/jobs/worker-messaging.ts:22:22
4:37:09 PM:
4:37:09 PM:
4:37:09 PM: not finished Merge worker state - 0.058s
4:37:09 PM: error Command failed with exit code 1.
4:37:09 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
4:37:09 PM:
4:37:09 PM: ────────────────────────────────────────────────────────────────
4:37:09 PM: "build.command" failed
4:37:09 PM: ────────────────────────────────────────────────────────────────
4:37:09 PM:
4:37:09 PM: Error message
4:37:09 PM: Command failed with exit code 1: yarn postinstall && yarn build:incremental
4:37:09 PM:
4:37:09 PM: Error location
4:37:09 PM: In build.command from netlify.toml:
4:37:09 PM: yarn postinstall && yarn build:incremental
4:37:09 PM:
```
I cleared my Netlify cache before running this and this seems like a new issue as per https://github.com/gatsbyjs/gatsby/issues/33738#issuecomment-1055595579
### Reproduction Link
tbd
### Steps to Reproduce
Following steps outlined here: https://github.com/gatsbyjs/gatsby/issues/33738
### Expected Result
For the site to build as it normally did before I updated packages.
### Actual Result
Consistently fails
### Environment
```shell
System:
OS: macOS 12.0.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.4.0 - /var/folders/tb/qb7x5sw53vngt06y9g92csn80000gp/T/yarn--1646432031346-0.9788514151471666/node
Yarn: 1.22.17 - /var/folders/tb/qb7x5sw53vngt06y9g92csn80000gp/T/yarn--1646432031346-0.9788514151471666/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v17.4.0/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
Browsers:
Chrome: 99.0.4844.51
Safari: 15.1
```
### Config Flags
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true
### Links/References
https://answers.netlify.com/t/error-unhandled-exception-write-epipe/52650
https://answers.netlify.com/t/gatsby-v4-works-locally-but-timed-out-on-netlify/46339/2
https://answers.netlify.com/t/gatsby-v4-works-locally-but-timed-out-on-netlify/46339/21
Sticking with v4.6.2 for now.
1 Like