Immutable solution version
Consistent timeout when uploading sourcemaps for next.js (turbopack)
Complete solution
Context
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.
Verified resolution
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.
Evidence
In gh:PostHog/posthog-js#2240 (https://github.com/PostHog/posthog-js/issues/2240), the question was: 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. The verified resolution: 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.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_i_I3OoIj8h_xR6KiOzzLYA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Consistent timeout when uploading sourcemaps for next.js (turbopack) <span>— Vectle</span></a>