Skip to content

Error: write EPIPE #9014

@michaelholstdev

Description

@michaelholstdev

Describe the bug

Vitest is failing randomly with the error Error: write EPIPE. Sometimes (mostly the first runs) are succeed and at some point, when the notebook is under more pressure, it starts failing. Also tested this setup with our runners, 2-3 are failing out of 5 with the same error in different areas.

I saw also that if it fails multiple times, that there node processes running in the background which will not be cleared.

node:events:486
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (node:internal/child_process:877:20)
    at ChildProcess.target.send (node:internal/child_process:751:19)
    at ForksPoolWorker.send (file:///Users/michaelholst/Documents/projects/k3k-web-frontend/node_modules/vitest/dist/chunks/cli-api.BQ-bjcRi.js:6839:13)
    at PoolRunner.postMessage (file:///Users/michaelholst/Documents/projects/k3k-web-frontend/node_modules/vitest/dist/chunks/cli-api.BQ-bjcRi.js:6677:63)
    at post (file:///Users/michaelholst/Documents/projects/k3k-web-frontend/node_modules/vitest/dist/chunks/cli-api.BQ-bjcRi.js:6668:28)
    at EventEmitter.onMessage (file:///Users/michaelholst/Documents/projects/k3k-web-frontend/node_modules/vitest/dist/chunks/index.DAL392Ss.js:152:19)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
Emitted 'error' event at:
    at ChildProcess.emitWorkerError (file:///Users/michaelholst/Documents/projects/k3k-web-frontend/node_modules/vitest/dist/chunks/cli-api.BQ-bjcRi.js:6769:22)
    at ChildProcess.emit (node:events:508:28)
    at node:internal/child_process:881:39
    at processTicksAndRejections (node:internal/process/task_queues:85:11) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Reproduction

  1. fork https://gitlab.opencode.de/opentalk/web-frontend/-/tree/main
  2. download patch 0001-chore-deps-update-node.js-to-v24.patch
  3. git apply --verbose 0001-chore-deps-update-node.js-to-v24.patch
  4. pnpm install
  5. pnpm test:unit:ci

Last step is running in the pipeline, you can find other scripts in the package.json in the root directory of the monorepo.

System Info

System:
    OS: macOS 15.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 5.69 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.11.0 - /Users/michaelholst/.nvm/versions/node/v24.11.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 11.6.1 - /Users/michaelholst/.nvm/versions/node/v24.11.0/bin/npm
    pnpm: 10.21.0 - /usr/local/bin/pnpm
    Deno: 1.23.1 - /usr/local/bin/deno
    Watchman: 2025.04.14.00 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 141.1.83.118
    Chrome: 142.0.7444.135
    Firefox Developer Edition: 145.0
    Safari: 18.6
  npmPackages:
    @vitest/coverage-v8: 4.0.8 => 4.0.8 
    @vitest/eslint-plugin: ^1.4.1 => 1.4.1 
    vitest: 4.0.8 => 4.0.8

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p4-importantViolate documented behavior or significantly improves performance (priority)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions