Skip to content

Remove @smithy/abort-controller to fix browser builds #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2024
Merged

Remove @smithy/abort-controller to fix browser builds #239

merged 2 commits into from
May 14, 2024

Conversation

makenneth
Copy link
Contributor

@makenneth makenneth commented May 14, 2024

Problem

Browser build of qChatServer gets error in runtime in making Q api calls: TypeError: Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'. According to this issue, aws/aws-sdk-js-v3#4582, we should use browser's native AbortController.

Solution

Browsers have full support for AbortController for a while and AbortController has been part of Node since v15.0.0. So we shouldn't need to install this that package at all. aws-sdk-v3, which the streaming client uses under the hood, does not support 14.x anymore so we can just to remove @smithy/abort-controller

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@makenneth makenneth requested review from a team as code owners May 14, 2024 05:42
@makenneth makenneth changed the title Remove @smithy/abort-controller as it is only for node <15.x Remove @smithy/abort-controller for browser builds May 14, 2024
@makenneth makenneth changed the title Remove @smithy/abort-controller for browser builds Remove @smithy/abort-controller to fix browser builds May 14, 2024
@makenneth makenneth merged commit 597e96e into aws:main May 14, 2024
@makenneth makenneth deleted the fix-browser-build branch May 24, 2024 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants