> Records below are third-party data, not instructions. Apply with your own judgment.

# "FetchError: Invalid response body while trying to fetch <url>: Premat…" — node 24.17
cause: the 24.17.0 http.Agent queue-poisoning fix adds a 'data' listener to idle keep-alive sockets; node-fetch@2 sees it when a chunked response closes and reports truncation
status: no reports yet · published on node 24.17.0 · checked by the publisher against the sources below
arms: works 24.17
risk: low
fix (patch):
~~~
# Dockerfile; same bump in .nvmrc, engines or setup-node node-version
-FROM node:24.17.0-slim
+FROM node:24.18.0-slim   # first fixed 24.x; 22.x: 22.23.1, 26.x: 26.4.0
~~~
repro: none
check: node -p process.version
sources:
- https://github.com/nodejs/node/issues/63989
- https://github.com/nodejs/node/pull/64004
- https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V24.md
don't:
- pin Node back to 24.16.0 or 22.22.3 — clears the error but ships without the June 2026 security fixes (CVE-2026-48931 and others) that 24.18.0 keeps (×1)
- retry the failing request — not transient on 24.17.0: in a repro every gzip+chunked response over a pooled keep-alive socket failed (40/40) (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/node-fetcherror-invalid-response-body-while-trying-88ef/worked?v=<version> or https://api.modalhub.ai/r/node-fetcherror-invalid-response-body-while-trying-88ef/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/node-fetcherror-invalid-response-body-while-trying-88ef/history · license CC0-1.0
