[v2] AbortController is not defined on @uppy/aws-s3-multipart when SSR
See original GitHub issueWhen importing @uppy/aws-s3-multipart on a SSR situation (Nuxt) the error AbortController is not defined
is thrown

Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ReferenceError: AbortController is not defined #4019 - GitHub
I use ipfs-http-client in aws lambda ( .zip file archives way) which do not support node 16 yet. 2
Read more >Why is AbortController not defined? - Stack Overflow
I tried to create AborterController in a browser and same error. Chrome. Why it doesn't support new AbortController() ? – karolis2017. Apr 17, ......
Read more >AbortController() - Web APIs - MDN Web Docs
The AbortController() constructor creates a new AbortController object instance.
Read more >The complete guide to AbortController in Node.js
It is for aborting certain asynchronous operations natively in Node. This tutorial will be a complete guide to the AbortController and ...
Read more >Using AbortController to deal with race conditions in React
This article explains what race conditions are and provides a solution using the AbortController.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, this library (and fix) not meant to be run on node.js, it just allows the server side bundle to not fail when generating the HTML for the client, I don’t think a polyfill is needed as it will never run on Server Side, instead just the check if variable it not undefined is more than enough to allow it to work.
For the record, it was decided not to polyfill this:
AbortController
is available on all the browsers Uppy officially supports, it wouldn’t make sense to add a polyfill to fix an issue that doesn’t affect a supported environment. Instead, we decided to land https://github.com/transloadit/uppy/pull/3169 to fix theReferenceError
on environments that do not haveAbortController
andAbortSignal
globally available; although users of such environments should be aware that they might encounter other errors if the code is trying to use those API, and they should consider upgrading to an environment that does support it (such as Node.js 16.x), or polyfill it themselves.