You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed strange errors when attempting to upgrade 5.0.0, throughout our unit tests. Anywhere we invoked a fetch-retry-wrapped fetch, we got this error:
ReferenceError: Request is not defined
It traces to this PR: #59. Request isn't part of Node's global environment, so this check causes a ReferenceError. This applies regardless of fetch implementation, so I think it will unfortunately break all projects using Node.
I think a typeof Request !== 'undefined' prior to the instanceof check might be enough to fix things for Node. I would normally put up a PR but I'm swamped at the moment -- I can follow up on this when I have more time if that would be helpful.
The text was updated successfully, but these errors were encountered:
👋🏼 Hi!
We noticed strange errors when attempting to upgrade 5.0.0, throughout our unit tests. Anywhere we invoked a
fetch-retry
-wrappedfetch
, we got this error:It traces to this PR: #59.
Request
isn't part of Node's global environment, so this check causes aReferenceError
. This applies regardless offetch
implementation, so I think it will unfortunately break all projects using Node.I think a
typeof Request !== 'undefined'
prior to theinstanceof
check might be enough to fix things for Node. I would normally put up a PR but I'm swamped at the moment -- I can follow up on this when I have more time if that would be helpful.The text was updated successfully, but these errors were encountered: