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
I'm trying to use this library while bundling and minifying using esbuild. When I run the minified bundle locally, I see this error while fetching in my logs:
TypeError: Expected signal to be an instanceof AbortSignal
As a workaround, a lot of bundlers either support a "keep names" option directly or have plugins for minification that support similar functionality. (e.g. esbuild index.ts --bundle --minify --keep-names).
But it would be nice to get node-fetch upgraded to avoid requiring the workaround. Just documenting here in case someone else runs into a similar error.
We use
node-fetch
as the underlying fetch library many places in our code:node-fetch-retry: https://github.com/adobe/node-fetch-retry/blob/master/package.json#L13
node-openwhisk-newrelic: https://github.com/adobe/node-openwhisk-newrelic/blob/master/package.json#L14
In some cases, we use a deprecated
node-fetch-npm
library:node-httptransfer: https://github.com/adobe/node-httptransfer/blob/master/package.json#L26
We should be using the newest stable version of node-fetch (v3), which has breaking changes everywhere in our code to lessen the tech debt.
https://github.com/node-fetch/node-fetch/releases/tag/v3.0.0
ideally move to at least 3.1.1: https://github.com/node-fetch/node-fetch/releases/tag/v3.1.1 (or the most recent v3 version)
Note: v3 is now an ESM package.
The text was updated successfully, but these errors were encountered: