fix: document turbot download body.on streaming bug and workaround (#63)#64
Open
vkumbha wants to merge 1 commit into
Open
fix: document turbot download body.on streaming bug and workaround (#63)#64vkumbha wants to merge 1 commit into
vkumbha wants to merge 1 commit into
Conversation
Documents the Web ReadableStream vs Node.js Readable mismatch that causes `turbot download` to fail in v1.32.x and v1.33.x, includes a NODE_OPTIONS workaround for affected users, and shows the one-line Readable.fromWeb() fix for CLI maintainers. Fixes #63 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
turbot downloadfailure (body.on is not a function) affecting v1.32.x and v1.33.x in a new Troubleshooting section of the READMENODE_OPTIONSworkaround so users can download mods immediately without waiting for a CLI patchReadable.fromWeb()) for CLI maintainers to apply in the private source repoRoot Cause (for CLI maintainers)
The download implementation calls
.on('data', ...)on the response body returned by nativefetch(). In Node.js 18+,fetch()returns a WebReadableStream(which has no.on()), not the Node.jsstream.Readablethatnode-fetchused to return. The fix is a one-liner:Test plan
NODE_OPTIONSworkaround successfully captures the S3 URL andcurldownloads the zip@turbot/aws-lambda@5.19.1, 39 MB) is valid and deploys successfully viaturbot up --zip-fileCloses #63
🤖 Generated with Claude Code