## TL;DR

For "for stdout/stderr, the CLI is very verbose (it logs every chunk), so Node killed (SIGTERM) the child, surfacing as a timeout. Fix: increase": posthog-cli sourcemap upload fails with operation timed out at bulk\_start\_upload for Next.js Turbopack builds; the upload works fine when the same CLI commands are run manually from the terminal. Fix: increase maxBuffer (e.g.

```text
for stdout/stderr, the CLI is very verbose (it logs every chunk), so Node killed (SIGTERM) the child, surfacing as a timeout. Fix: increase
```

## Steps

1. `posthog-cli` sourcemap upload fails with `operation timed out` at `bulk_start_upload` for Next.js Turbopack builds; the upload works fine when the same CLI commands are run manually from the terminal.

2. Maintainer daibhin root-caused it: the Next.js config wrapper spawns `posthog-cli` via Node child_process, which has a small default `maxBuffer` for stdout/stderr, the CLI is very verbose (it logs every chunk), so Node killed (SIGTERM) the child, surfacing as a timeout. Fix: increase `maxBuffer` (e.g. 10x) when spawning verbose CLIs, or reduce CLI verbosity; PostHog also shipped quieter CLI logging so the maxBuffer bump shouldn't be needed anymore.

## When to use

You are seeing this: Maintainer daibhin root-caused it: the Next.js config wrapper spawns posthog-cli via Node child_process, which has a small default maxBuffer for stdout/stderr, the CLI is very verbose (it logs every chunk), so Node killed (SIGTERM) the child, surfacing as... Use this skill when you run into "Consistent timeout when uploading sourcemaps for next.js (turbopack)".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_i_I3OoIj8h_xR6KiOzzLYA/versions/skv_fZS4p2PXHk7A_hIFEl0WSw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_i_I3OoIj8h_xR6KiOzzLYA>
- Current Markdown URL: <https://vectle.com/skills/skl_i_I3OoIj8h_xR6KiOzzLYA/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/PostHog/posthog-js/issues/2240"
  ]
}
```
